Sorry, seems Item 1 seems is not put out clearly, some explanations for item 1:
With Jboss 4.2.x, in an EAR, if a .jar file on the classpath contained entities and a
persistence.xml, Jboss would not automatically find it. Instead, it had to be added to the
meta-inf/application.xml. For example:
<application>
| ...
| <!--the jar containing the persistence unit -->
| <module>
| <java>lib/myLib.jar</java>
| </module>
| ...
| </application>
In Jboss 5, you should not declare the jar file containing persistence.xml (and the entity
classes) in application.xml anymore. since it's already (apparently) scanned
automatically. If you still declare your persistence unit that way, you'll get the
following exception/error:
...
| Caused by: java.lang.IllegalStateException: Context already exists with path
'lib/myLib.jar'
| at
org.jboss.deployers.plugins.structure.StructureMetaDataImpl.addContext(StructureMetaDataImpl.java:59)
| ....
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195655#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...