|
WFLY-4292
got rejected and I think it's correct. As mentioned before, PU is not visible outside of the EJB-JAR where it's defined. A JAR file can only reference classes and resources which does not imply it must honor the services or deployment descriptors from a referenced library. Feel free to reopen if you believe that there are some strong arguments or spec requirements for this.
JPA spec, 8.2.2 Persistence Unit Scope:
A persistence unit that is defined at the level of an EJB-JAR, WAR, or application client jar is scoped to that EJB-JAR, WAR, or application jar respectively and is visible to the components defined in that jar or war.
EE spec, EE.8.2 Library Support:
Using this mechanism a Java EE JAR file can reference utility classes or other shared classes or resources packaged in a separate .jar file or directory that is included in the same Java EE application package, or that has been previously installed in the Java EE containers.
|