Hi,
I've run into a little bit of a wall with regards to persistence.xml and externalising the URL for the database. You see I'm trying to create a 'server' and be able to have the datasource 'javax.persistence.jdbc.url' be supplied by the server. Currently, I'm doing all sorts of tricks with maven and file copying to get around it but so far it hasn't been a good solution for me as I have many modules (hence, many persistence-units). I realise that it can be a limitation stemming from JPA itself and no formal standard for externalising properties (hence why they appear to be relying on JNDI lookups).
I am using Glassfish. Basically, what I am trying to get at:
E.g. persistence.xml
<persistence-unit name="invoicingTxUnit" transaction-type="JTA">
<provider>x.y.z.ObjectDbJPAMockProvider</provider>
<jta-data-source>jdbc/jpaProviderMockPool</jta-data-source>
<properties>
<!--
TODO: I would like at all costs not to have any URL or AUTH info here - so that it will depend on my
dev/test/production environments without me having to edit manually prior deployment or rely on build scripts
-->
</properties>
</persistence-unit>
So, anyone encounter any tutorials for handling multi-environment (dev/test/prod), multi-module deployments with ObjectDB as the datastore either with Glassfish/JBoss and having environment specific datastore properties being build independent?
I can solve the issue for PostgreSQL/mySQL and traditional DB's through the container.
Thanks for your time!