We are creating a portlet with persistence layer (jpa/eclipselink) delivered by a jar (a 2nd maven module).
parent
|---portlet-module (war)
|---persistence-module (jar)
The idea was to completely encapsulate the persistence layer and only deliver a simple service class with all crud methods. The portlet (or whatever in future) does not have to know anything about jpa stuff. The portlet must only deliver the data base link (url, user...). But this seems not to work because the portlet needs its own persitence.xml including all entity classes (fully qualified) - is this correct? Or is there a way to deliver the persistence layer together with persistence unit? (complete encapsulation)