Hi guys We are working on Glassfish 3.0.1 and are using Hibernate 3.5.3. Our project setup is as follows:
frontend.war
common.jar
backend.war
We would like to add jpa2 annotated objects to common.jar so that the backend treats them as JPA2 entities, but the interface should only see them as POJO / DTO. We thought this could be achieved by adding persistence.xml to backend.war and does not have persistence.xml in the interface. This does not work after starting the backend and calling entityManager.getMetamodel (). GetEntities (), we get an empty list. All requests fail with exceptions: "Not an entity: com.example.model.OurEntity".
We tried both with beans.xml and without it in common.jar.
Any idea what we're doing wrong? Can this structure be used with JPA2?
source
share