Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents
 Search
 PDFComments
Comments


persistence-context.close-on-commit

Use eclipselink.persistence-context.close-on-commit to specify if the EntityManager will be closed or not used after commit (not extended).


Values

Table 5-76 describes this persistence property's values.

Table 5-76 Valid Values for persistence-context.close-on-commit

Value Description

true


false

(Default)



Usage

For a container managed EntityManager and most application managed, normally set this property to false, in order to avoid additional performance overhead of resuming the persistence context after a commit() transaction.

The property set in persistence.xml or passed to createEntityManagerFactory affects all EntityManagers created by the factory. Alternatively, to apply the property to specific EntityManagers, pass it to createEntityManager method.


Examples


See Also

For more information, see: