Hi Sergio,
Puting persistence.xml into the META-INF directory of an ear file won't be an expected packaging configuration. I'm also not sure about the solution with having 2 persistence.xml files defining persistence units with the same name inside and outside the base-entities.jar.
Will it work if you add <jar-file>other-entities.jar</jar-file> to that of the persistence.xml of the base-entities.jar? You will not need to have lib/ in the ref name in that case as the location of the jar is specified in relationship to the PU root (i.e. META-INF location).
You can also have a 3rd jar in the lib/ directory that consist of the META-INF/persistence.xml only with the references to the other 2 jars (but no persistence.xml in those jars).
Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=217147