persistence
persistence copied to clipboard
Configurable persistence.xml
Consider to integrate Config spec and make the item in the persistence.xml can be configured as expression language.
<jta-data-source>${app.jndi.dataSource}</jta-data-source>
BTW, consider environmental variants for the persistence.xml.
For example,
-
Configure profile in the persistence.xml.
<persistence-unit profile="prod" ....>
-
profile based file naming. eg. persistence-default.xml , persistence-prod.xml , persistence-openshift.xml .