Package org.hibernate.testing.boot
Class JdbcConnectionAccessImpl
- java.lang.Object
-
- org.hibernate.testing.boot.JdbcConnectionAccessImpl
-
- All Implemented Interfaces:
java.io.Serializable,JdbcConnectionAccess
public class JdbcConnectionAccessImpl extends java.lang.Object implements JdbcConnectionAccess
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JdbcConnectionAccessImpl(ConnectionProvider connectionProvider)JdbcConnectionAccessImpl(ServiceRegistry serviceRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.ConnectionobtainConnection()Obtain a JDBC connectionvoidreleaseConnection(java.sql.Connection connection)Release a previously obtained connectionbooleansupportsAggressiveRelease()Does the underlying provider of connections support aggressive releasing of connections (and re-acquisition of those connections later, if need be) in JTA environments?
-
-
-
Constructor Detail
-
JdbcConnectionAccessImpl
public JdbcConnectionAccessImpl(ConnectionProvider connectionProvider)
-
JdbcConnectionAccessImpl
public JdbcConnectionAccessImpl(ServiceRegistry serviceRegistry)
-
-
Method Detail
-
obtainConnection
public java.sql.Connection obtainConnection() throws java.sql.SQLExceptionDescription copied from interface:JdbcConnectionAccessObtain a JDBC connection- Specified by:
obtainConnectionin interfaceJdbcConnectionAccess- Returns:
- The obtained connection
- Throws:
java.sql.SQLException- Indicates a problem getting the connection
-
releaseConnection
public void releaseConnection(java.sql.Connection connection) throws java.sql.SQLExceptionDescription copied from interface:JdbcConnectionAccessRelease a previously obtained connection- Specified by:
releaseConnectionin interfaceJdbcConnectionAccess- Parameters:
connection- The connection to release- Throws:
java.sql.SQLException- Indicates a problem releasing the connection
-
supportsAggressiveRelease
public boolean supportsAggressiveRelease()
Description copied from interface:JdbcConnectionAccessDoes the underlying provider of connections support aggressive releasing of connections (and re-acquisition of those connections later, if need be) in JTA environments?- Specified by:
supportsAggressiveReleasein interfaceJdbcConnectionAccess- Returns:
- true/false
- See Also:
ConnectionProvider.supportsAggressiveRelease(),MultiTenantConnectionProvider.supportsAggressiveRelease()
-
-