spring-framework / org.springframework.orm.jpa / JpaDialect / releaseJdbcConnection

releaseJdbcConnection

abstract fun releaseJdbcConnection(conHandle: ConnectionHandle, entityManager: EntityManager): Unit

Release the given JDBC Connection, which has originally been retrieved via getJdbcConnection. This should be invoked in any case, to allow for proper release of the retrieved Connection handle.

An implementation might simply do nothing, if the Connection returned by getJdbcConnection will be implicitly closed when the JPA transaction completes or when the EntityManager is closed.

Parameters

conHandle - the JDBC Connection handle to release

entityManager - the current JPA EntityManager

Exceptions

javax.persistence.PersistenceException - if thrown by JPA methods

java.sql.SQLException - if thrown by JDBC methods

See Also
#getJdbcConnection