Is there a way to set the EclipseLink properties (e.g. target database) in a place different from persistence.xml
?
Rational: I have a JPA module defining the data structure and containing persistence.xml
. The module might be used with different target databases. In a Java SE application one can set the eclipse link properties programmatically upon creation of EntityManagerFactory
. However, when the JPA module is packaged in an EAR for the Glassfish application server the target database must be defined in persistence.xml
... or is there another way?