Using Griffon 1.2 and JPA is there any way to configure the persistence.xml with environmental properties - so I can have a different jdbc.url for dev/test/prod ?
i.e. conf/metainf/persistence.xml
<property name="javax.persistence.jdbc.url" value="${javax.persistence.jdbc.url}" />
I was hoping something like this would work in JpaConfig.groovy
environments {
development {
persistenceUnit {
entityManager {
// EntityManager properties go here
javax.persistence.jdbc.url = 'jdbc:h2:mem:sample'
}
}
}...
I could create multiple duplicate persistence xml files and I believe I can specify the active persistence unit in JpaConfig.groovy. Or is there some other way to parameterize the JPA configuration per environment?
Thanks