javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ServerTimeZoneID=UTC

datanucleus.schema.autoCreateDatabase=true
datanucleus.schema.autoCreateTables=true
datanucleus.schema.autoCreateColumns=true
datanucleus.schema.autoCreateConstraints=true
datanucleus.schema.validateTables=true
datanucleus.schema.validateColumns=true
datanucleus.schema.validateConstraints=true

datanucleus.persistenceByReachabilityAtCommit=false
datanucleus.manageRelationships=false
datanucleus.manageRelationshipsChecks=false

javax.jdo.option.Optimistic=false

# RDBMS-specific
datanucleus.identifier.case=LowerCase
datanucleus.rdbms.dynamicSchemaUpdates=true
datanucleus.rdbms.stringDefaultLength=255

# PostgreSQL
javax.jdo.option.ConnectionDriverName=org.postgresql.Driver
javax.jdo.option.ConnectionURL=jdbc:postgresql://${jdbc.hostName}/${jdbc.dbNamePrefix}${repository.id}${jdbc.dbNameSuffix}
javax.jdo.option.ConnectionUserName=${jdbc.userName}
javax.jdo.option.ConnectionPassword=${jdbc.password}
datanucleus.Mapping=postgresql

# Connection pooling - http://www.datanucleus.org/products/accessplatform_4_1/jdo/datastore_connection.html#pooling
datanucleus.connectionPool.maxIdle=10
datanucleus.connectionPool.minIdle=3
datanucleus.connectionPool.maxActive=20
datanucleus.connectionPool.maxWait=60

## Don't know why, but this causes trouble. We don't need it anyway - it's embedded, i.e. connection cannot break.
## TODO copied this from derby -- need to test with postgresql!
#datanucleus.connectionPool.testSQL=select 1 from sys.sysusers where 1 = 0

datanucleus.connectionPool.timeBetweenEvictionRunsMillis=2400000
