Interface JdbcConnectionAccess
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ContextualJdbcConnectionAccess,JdbcConnectionAccessConnectionProviderImpl,JdbcConnectionAccessImpl,JdbcConnectionAccessProvidedConnectionImpl,JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess,JdbcEnvironmentInitiator.MultiTenantConnectionProviderJdbcConnectionAccess,NonContextualJdbcConnectionAccess
public interface JdbcConnectionAccess extends Serializable
Provides 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 ConnectionobtainConnection()Obtain a JDBC connectionvoidreleaseConnection(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
Connection obtainConnection() throws SQLException
Obtain a JDBC connection- Returns:
- The obtained connection
- Throws:
SQLException- Indicates a problem getting the connection
-
releaseConnection
void releaseConnection(Connection connection) throws SQLException
Release a previously obtained connection- Parameters:
connection- The connection to release- Throws:
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()
-
-