Interface JdbcConnectionAccess
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
JdbcConnectionAccessImpl
public interface JdbcConnectionAccess extends java.io.SerializableProvides centralized access to JDBC connections. Centralized to hide the complexity of accounting for contextual (multi-tenant) versus non-contextual access.
-
-
Method Summary
All Methods Instance Methods Abstract 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?
-
-
-
Method Detail
-
obtainConnection
java.sql.Connection obtainConnection() throws java.sql.SQLExceptionObtain a JDBC connection- Returns:
- The obtained connection
- Throws:
java.sql.SQLException- Indicates a problem getting the connection
-
releaseConnection
void releaseConnection(java.sql.Connection connection) throws java.sql.SQLExceptionRelease a previously obtained connection- Parameters:
connection- The connection to release- Throws:
java.sql.SQLException- Indicates a problem releasing the connection
-
supportsAggressiveRelease
boolean supportsAggressiveRelease()
Does the underlying provider of connections support aggressive releasing of connections (and re-acquisition of those connections later, if need be) in JTA environments?- Returns:
- true/false
- See Also:
ConnectionProvider.supportsAggressiveRelease(),MultiTenantConnectionProvider.supportsAggressiveRelease()
-
-