persistence units in ear's lib need to be global
------------------------------------------------
Key: GERONIMO-5423
URL: https://issues.apache.org/jira/browse/GERONIMO-5423
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: deployment, persistence
Affects Versions: 3.0
Reporter: David Jencks
Assignee: David Jencks
Fix For: 3.0
In EE5 I interpreted this statememt (and possibly others I can't find right
now) from e.g. EE 8.3.1:
Note that the presence of component-declaring annotations in shared artifacts,
such as libraries in the library directory and libraries referenced by more
than one module through Class-Path references, can have unintended and
undesirable consequences and is not recommended.
to apply to jpa entities so if there's a jar with persistence.xml in the ear
lib directory we cooked up a persistence unit for each module in the ear. EE6
lets you put persistence-context-refs and persistence-unit-refs in the
application.xml which obviously have to refer to something available at the ear
level, so my conclusion is that we ought to be deploying persistence units in
an ear lib once for the whole ear. (well, maybe also once in each app client).
This makes a lot more sense and aligns better with the osgi jpa stuff.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.