Top Description Methods
org.hibernate.resource.jdbc.spi

public Interface LogicalConnectionImplementor

extends LogicalConnection
Known Direct Implementers
org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor
Imports
java.io.IOException, .ObjectOutputStream, java.sql.Connection, org.hibernate.resource.jdbc.LogicalConnection

SPI contract for LogicalConnection.
Author
Steve Ebersole
See Also
org.hibernate.engine.jdbc.spi.JdbcCoordinator#getLogicalConnection()

Method Summary

Modifier and TypeMethod and Description
public void
afterStatement()

Notification indicating a JDBC statement has been executed, to trigger org.hibernate.ConnectionReleaseMode#AFTER_STATEMENT releasing if needed.

public void
afterTransaction()

Notification indicating a transaction has just completed, to trigger org.hibernate.ConnectionReleaseMode#AFTER_TRANSACTION releasing if needed.

public void
beforeTransactionCompletion()

Notification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, if org.hibernate.ConnectionReleaseMode#BEFORE_TRANSACTION_COMPLETION is enabled.

public PhysicalConnectionHandlingMode
public Connection

Returns:

The connection
getPhysicalConnection
()

Exposes access to the "real" Connection.

public PhysicalJdbcTransaction
getPhysicalJdbcTransaction()

Access to the current underlying JDBC transaction.

public Connection

Returns:

The connection maintained here at time of disconnect. null if there was no connection cached internally.
manualDisconnect
()

Manually disconnect the underlying JDBC Connection.

public void
manualReconnect(Connection
For user supplied connection strategy the user needs to hand us the connection with which to reconnect. It is an error to pass a connection in the other strategies.
suppliedConnection
)

Manually reconnect the underlying JDBC Connection.

public void
serialize(ObjectOutputStream
The stream to write out state to
oos
)

Serialization hook.

Inherited from org.hibernate.resource.jdbc.LogicalConnection:
closegetResourceRegistryisOpenisPhysicallyConnected

Method Detail

afterStatementback to summary
public void afterStatement()

Notification indicating a JDBC statement has been executed, to trigger org.hibernate.ConnectionReleaseMode#AFTER_STATEMENT releasing if needed.

afterTransactionback to summary
public void afterTransaction()

Notification indicating a transaction has just completed, to trigger org.hibernate.ConnectionReleaseMode#AFTER_TRANSACTION releasing if needed.

beforeTransactionCompletionback to summary
public void beforeTransactionCompletion()

Notification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, if org.hibernate.ConnectionReleaseMode#BEFORE_TRANSACTION_COMPLETION is enabled.

getConnectionHandlingModeback to summary
public PhysicalConnectionHandlingMode getConnectionHandlingMode()
getPhysicalConnectionback to summary
public Connection getPhysicalConnection()

Exposes access to the "real" Connection.

Returns:Connection

The connection

getPhysicalJdbcTransactionback to summary
public PhysicalJdbcTransaction getPhysicalJdbcTransaction()

Access to the current underlying JDBC transaction.

manualDisconnectback to summary
public Connection manualDisconnect()

Manually disconnect the underlying JDBC Connection. The assumption here is that the manager will be reconnected at a later point in time.

Returns:Connection

The connection maintained here at time of disconnect. null if there was no connection cached internally.

manualReconnectback to summary
public void manualReconnect(Connection suppliedConnection)

Manually reconnect the underlying JDBC Connection. Should be called at some point after manualDisconnect().

Parameters
suppliedConnection:Connection

For user supplied connection strategy the user needs to hand us the connection with which to reconnect. It is an error to pass a connection in the other strategies.

serializeback to summary
public void serialize(ObjectOutputStream oos) throws IOException

Serialization hook.

Parameters
oos:ObjectOutputStream

The stream to write out state to

Exceptions
IOException:
Problem accessing stream