Top Description Methods
org.hibernate.engine.jdbc.connections.spi

public Interface JdbcConnectionAccess

extends Serializable
Known Direct Implementers
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess, org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.MultiTenantConnectionProviderJdbcConnectionAccess, org.hibernate.internal.ContextualJdbcConnectionAccess, org.hibernate.internal.NonContextualJdbcConnectionAccess, org.hibernate.tool.schema.internal.exec.JdbcConnectionAccessConnectionProviderImpl, org.hibernate.tool.schema.internal.exec.JdbcConnectionAccessProvidedConnectionImpl
Imports
java.io.Serializable, java.sql.Connection, .SQLException

Provides centralized access to JDBC connections. Centralized to hide the complexity of accounting for contextual (multi-tenant) versus non-contextual access.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public Connection

Returns:

The obtained connection
obtainConnection
()

Obtain a JDBC connection

public void
releaseConnection(Connection
The connection to release
connection
)

Release a previously obtained connection

public boolean

Returns:

true/false
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?

Method Detail

obtainConnectionback to summary
public Connection obtainConnection() throws SQLException

Obtain a JDBC connection

Returns:Connection

The obtained connection

Exceptions
SQLException:
Indicates a problem getting the connection
releaseConnectionback to summary
public void releaseConnection(Connection connection) throws SQLException

Release a previously obtained connection

Parameters
connection:Connection

The connection to release

Exceptions
SQLException:
Indicates a problem releasing the connection
supportsAggressiveReleaseback to summary
public 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:boolean

true/false

See Also
ConnectionProvider#supportsAggressiveRelease(), MultiTenantConnectionProvider#supportsAggressiveRelease()