Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Multiple persistent units

Hi,

I have one EJB project with two beans refering to two different data bases using two persistence units.

Bean A - persistence unit DB_A_unit - entity class CL_A - table DB_A

Bean B - persistence unit DB_B_unit - entity class CL_B - table DB_B

In persistence.xml I defined both units with different data source aliases.

Now I try to execute a method of bean A and get the exception:

The persistence unit is inconsistent with the database schema

The table DB_B does not exist.

If I try to execute a method of bean B I and get the exception:

The persistence unit is inconsistent with the database schema

The table DB_A does not exist.

Why does a method call in bean A affect the entity of bean B? How can I avoid this?

Thanks,

Kevin

Former Member
Not what you were looking for? View more on this topic or Ask a question