org.hibernate.engine.jdbc.spi
Interface JdbcConnectionAccess

All Superinterfaces:
Serializable

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
 Connection obtainConnection()
          Obtain a JDBC connection
 void releaseConnection(Connection connection)
          Release a previously obtained connection
 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?
 

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?

See Also:
ConnectionProvider.supportsAggressiveRelease(), MultiTenantConnectionProvider.supportsAggressiveRelease()


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.