[jboss-user] [EJB 3.0] - Re: Persistence unit scoping across multiple jars in a singl

raja05 do-not-reply at jboss.com
Sun Aug 13 06:13:57 EDT 2006


>From the EJB Spec,
anonymous wrote : 
  | A persistence unit must have a name. Only one persistence unit of any given name may be defined within a single EJB-JAR file, within a single WAR file, within a single application client jar, or within an EAR (in the EAR root or lib directory).
  | 
And as for scope of the persistence.xml (between EJB, WEB, or EAR)
anonymous wrote : 
  | A persistence unit that is defined at the level of the EAR is generally visible to all components in the application.
  | 

So if you put your generic persistence.xml in the root folder(where your EAR is defined or in a lib subfolder), all your sub deployments should be able to use that.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964828#3964828

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964828



More information about the jboss-user mailing list