cancel
Showing results for 
Search instead for 
Did you mean: 

Persistence context in different DCs

Former Member
0 Kudos

Hi all,

we have a project which contains some ejb-module dcs. At the moment, each dc has it's own persistence.xml, which prevents us from using an entity contained in dc 1 from dc 2, because it in a different persistence context. Is there a best practice for this problem?

regards,

Christian

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Christian,

If the entities within the two persistence units are used by a single application (that is, if you do not plan to reuse one of those DCs somewhere else), a possible best practice is to define all the entities within a single persistence unit (i.e. in either of the DCs, using only one persistence.xml file).

Best regards,

Yordan