title: JPA persistence.xml share same jar file
body: <p>I'm wondering if I can share the same jar file for several persistence units.. I mean: I have two persistence units described in my persistence.xml file and the entities are not in the same JAR. Entities are in a separated JAR file but, in that one, there are entites for both persistence units. I think I red somewhere that I coould use  tag something like this:
  externalEntities.jar#com.mycompany.EntityA
  so I could separate them. I tried this solution and it doesn't work. Now I guess that it couldn't be done to package all entities (for two different persistence units) in the same JAR file.</p>
  
  <p>What do yo think?</p>