[jboss-user] [EJB 3.0] New message: "Re: Persistence unit issues when migrating to JBOSS 5.1.0"
Dragos Bobes
do-not-reply at jboss.com
Thu Jan 7 16:46:43 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/518857#518857
Author : Dragos Bobes
Profile : http://community.jboss.org/people/dbobes
Message:
--------------------------------------------------------------
I found a way to specify which jars should be scanned for hibernate annotations. In persistence.xml:
<persistence-unit name="myapp">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/jdbc/myapp</jta-data-source>
<jar-file>myseammodule.jar</jar-file>
<properties>
...
</persistence-unit>
Now the container scans the myseammodule.jar for hibernate classes and everything works fine.
I still wonder if this structure is the best way to have the persistence unit scope set to ear level. 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
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518857#518857
More information about the jboss-user
mailing list