[jboss-user] [EJB 3.0] New message: "Re: Persistence unit issues when migrating to JBOSS 5.1.0"

jaikiran pai do-not-reply at jboss.com
Fri Jan 8 10:01:45 EST 2010


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/518990#518990

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

Message:
--------------------------------------------------------------
> dbobes wrote:
>  
>  I find it strange that I have to create an empty jar just to place persistence.xml at the root level of the ear.
> Is there a better way to accomplish this?
>  
> Thanks,
> Dragos
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.

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

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




More information about the jboss-user mailing list