[jboss-user] [EJB 3.0] - Re: How to ignore persistence unit loading

kariem do-not-reply at jboss.com
Mon Jun 22 04:36:24 EDT 2009


Thank you for taking the time to look at this.

"jaikiran" wrote : Where in the WAR file is this jar containing persistence.xml located? As far as i know, the WEB-INF/lib folder of an WAR is not scanned for deployments. So that should have skipped the persistence unit from deploying. But i will have to look at this once more to see if that's not how its expected to behave.

The JAR containing the  persistence unit is located in WEB-INF/lib/xxx.jar.

According to the EJB 3 persistence spec (JPA 1.0) section 6.2, the following location may contain the root of a persistence unit (root means the jar file or directory whose META-INF directory contains the persistence.xml):
anonymous wrote : 
  |   | * an EJB-JAR file
  |   | * the WEB-INF/classes directory of a WAR file
  |   | * a jar file in the WEB-INF/lib directory of a WAR file
  |   | * a jar file in the root of the EAR
  |   | * a jar file in the EAR library directory
  |   | * an application client jar file
  |   | 

That means that the persistence unit should be scanned with this type of packaging (item 3 in the list above).

Is there a way in JBoss (or generally in JEE) to prevent this scanning?

Thank you,
Kariem

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

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



More information about the jboss-user mailing list