I am using OpenJPA 1.2.3 in WebSphere with DB2. Is there a way to create and bundle my application so that the same application (EAR) can have a changing schema name based on the environment (DEV, ACPT, PROD, etc.).
My PU is configured to manage the container as follows:
<persistence>
<persistence-unit name="My_PU" transaction-type="JTA">
<jta-data-source>jdbc/DataSource</jta-data-source>
...
<properties>
<property name="openjpa.jdbc.Schema" value="MYSCHEMA"/>
<property name="openjpa.TransactionMode" value="managed"/>
<property name="openjpa.ConnectionFactoryMode" value="managed"/>
</properties>
</persistence-unit>
</persistence>
I reviewed this in ORM.xml, but it is still a static value for the schema and does not externalize the setting; In addition, it does not work (I saw how many topics discussed this). I also considered including this configuration in a WebSphere data source; this doesn't work either.
- Keith
source
share