User development,

A new message was posted in the thread "Persistence unit issues when migrating 
to JBOSS 5.1.0":

http://community.jboss.org/message/520280#520280

Author  : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran

Message:
--------------------------------------------------------------
> jaikiran wrote:
> 
> Place the persistence.xml in the META-INF of the .ear.
>  
> So:
> 
> myapp.ear
> |
> |--- META-INF
> |      |
> |      |--- persistence.xml
> 
> 
>  
> 
>  
> 
> And let the persistence.xml use the "jar-file" element to point to the jars 
> containing the entities. This is how the EJB3 persistence spec lets EAR level 
> persistence.xml to be deployed. For more details, see section 6.2 of EJB3 
> Persistence spec.
For the record - my statement is incorrect. The EJB3 spec doesn't _not_ specify 
that the persistence.xml can be placed in the META-INF of the .ear. According 
to the spec, for scoping a persistence unit at ear level, the persistence.xml 
should be packaged in:
 
*  META-INF of a jar file in the root of the EAR
or*  META-INF of a jar file in the EAR library directory
 
Note that although JBoss scans the .ear/META-INF/persistence.xml file, it's 
_not_ recommend that applications package their persistence.xml in this manner, 
since it can lead to issues like the one being discussed here 
http://community.jboss.org/message/520279

--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/520280#520280


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to