I am using OpenJPA 1.2.3 on WebSphere with DB2. I have spent a lot of time trying to figure out if there is a way to build and bundle my application in a way that allows for the same application (EAR) to have a changing Schema name based on environment (DEV,ACPT,PROD, etc).
My PU is setup up to be container managed 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 have looked into putting this in the ORM.xml, but this is still a static value for the schema, and does not externalize the setting; also, it doesn't seem to work (I have seen the many threads discussing this). I also, have looked into putting this configuration into the WebSphere data source; this does not seem to work either. Any help is appreciated. Thanks. --Keith -- View this message in context: http://openjpa.208410.n2.nabble.com/change-schema-based-on-environment-tp5901468p5901468.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.