Properties and config in persistence.xml

List of elements in persistence.xml

These elements can be overriden by following properties, if a map is passed to EntityManagerFactory:

  • javax.persistence.provider to define the provider class used
  • javax.persistence.transactionType to define the transaction type used (either JTA or RESOURCE_LOCAL)
  • javax.persistence.jtaDataSource to define the JTA datasource name in JNDI
  • javax.persistence.nonJtaDataSource to define the non JTA datasource name in JNDI
  • javax.persistence.lock.timeout pessimistic lock timeout in milliseconds (Integer or String)
  • javax.persistence.query.timeout query timeout in milliseconds (Integer or String)
  • javax.persistence.sharedCache.mode corresponds to the share-cache-mode element defined in Section 2.2.1, “Packaging”.
  • javax.persistence.validation.mode corresponds to the validation-mode element defined in Section 2.2.1, “Packaging”.

See Hibernate 3.5 reference

List of standard properties






Hibernate properties

Debug SQL:

Schema generation (optional):


EclipseLink properties

Schema generation (optional):


Leave a Reply

Your email address will not be published. Required fields are marked *