Lets say I have the following POJO:
public class MyThing {
private int myNumber;
private String myData;
//assume getter/setter methods
}
It is possible:
orm.xml
(conforming to the orm schema), and map the columns of your POJO, without even extending it. It will be JPA-enabled in one environment, and a POJO in the other oneThat said, I don't think it is necessary to do this. Just annotate your POJO, and add the compile-time dependency to your projects. Then each project will decide whether it will use them as JPA entities or not.