Skip to content

persistence.properties

Laird Nelson edited this page Mar 4, 2019 · 2 revisions

It would be nice to be able to load a minimal PersistenceUnitInfo from a properties file. Maybe like this:

javax.persistence.unit.test.transactionType=JTA # default
javax.persistence.unit.test.jtaDataSourceName=test # default is persistence unit name
javax.persistence.unit.test.classes=com.foo.Bar, com.foo.Baz, com.foo.Quux
javax.persistence.unit.dev.transactionType=RESOURCE_LOCAL
javax.persistence.unit.dev.jdbc.driver=org.h2.Driver
javax.persistence.unit.dev.jdbc.url=jdbc:h2:mem:test
javax.persistence.unit.dev.classes=com.frob.Whee
Clone this wiki locally