users@glassfish.java.net

Re: persistence.xml in multiple EJB module EAR

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 Apr 2008 13:10:21 PDT

Or put all entity classes in a separate library and put persistence.xml there too. Then you will have only 1 persistence.xml. Setup dependency on this library in each ejb module.

Its best to keep only one persistence.xml if you share entity beans, to avoid problems with having 2 persistence.xml on the classpath. Keep in mind that all ejb module dependency jars will not be packaged in the ejb jar, but in the ear - thus can be shared by all ejb modules and web modules.

Its a pitty netbeans doesn't allow finer selection of what should be packaged where and which classes.
[Message sent by forum member 'jarol1' (jarol1)]

http://forums.java.net/jive/thread.jspa?messageID=268243