persistence icon indicating copy to clipboard operation
persistence copied to clipboard

Configurable persistence.xml

Open hantsy opened this issue 3 years ago • 0 comments

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,

  1. Configure profile in the persistence.xml.

    <persistence-unit profile="prod" ....>
    
  2. profile based file naming. eg. persistence-default.xml , persistence-prod.xml , persistence-openshift.xml .

hantsy avatar Feb 05 '22 03:02 hantsy