aspose file tools*
The moose likes JBoss/WildFly and the fly likes Single persistence.xml file with multiple EJB jars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Single persistence.xml file with multiple EJB jars" Watch "Single persistence.xml file with multiple EJB jars" New topic
Author

Single persistence.xml file with multiple EJB jars

Dean Pullen
Ranch Hand

Joined: May 30, 2003
Posts: 58
Hi all,

Trying to place the persistence.xml file in the ear META-INF, and adding the two EJB jars explicitely, like so:





Unforunately this causes JBoss to error on start, cause:



I'm not sure why this isn't being deployed?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9343
    
111

Trying to place the persistence.xml file in the ear META-INF


As far as i know, JBoss does not look in the META-INF folder for the persistence.xml file. The JBoss EJB3 documentation says this:

3.2.2. persistence.xml and .jar files

Entities are placed in a EJB-JAR .jar file or a .jar file all their own. You must also define a persistence.xml file that resides in the META-INF folder of the .jar file.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Single persistence.xml file with multiple EJB jars
 
Similar Threads
jpa is not working
Unable to use @NamedQuery in a session bean?
A question about "persistence.xml" by Weblogic
EJB3 persistence unit setup in JBoss
Problem javax.persistence.NoResultException: No entity found for query