org.hibernate.engine.jdbc.spi
Interface LogicalConnection

All Superinterfaces:
Serializable
All Known Subinterfaces:
LogicalConnectionImplementor
All Known Implementing Classes:
LogicalConnectionImpl

public interface LogicalConnection
extends Serializable

LogicalConnection contract


Method Summary
 Connection close()
          Release the underlying connection and clean up any other resources associated with this logical connection.
 Connection getConnection()
          Retrieves the connection currently "logically" managed by this LogicalConnectionImpl.
 boolean isOpen()
          Is this logical connection open? Another phraseology sometimes used is: "are we logically connected"?
 boolean isPhysicallyConnected()
          Is this logical connection instance "physically" connected.
 

Method Detail

isOpen

boolean isOpen()
Is this logical connection open? Another phraseology sometimes used is: "are we logically connected"?

Returns:
True if logically connected; false otherwise.

isPhysicallyConnected

boolean isPhysicallyConnected()
Is this logical connection instance "physically" connected. Meaning do we currently internally have a cached connection.

Returns:
True if physically connected; false otherwise.

getConnection

Connection getConnection()
Retrieves the connection currently "logically" managed by this LogicalConnectionImpl.

Note, that we may need to obtain a connection to return here if a connection has either not yet been obtained (non-UserSuppliedConnectionProvider) or has previously been aggressively released.

Returns:
The current Connection.

close

Connection close()
Release the underlying connection and clean up any other resources associated with this logical connection.

This leaves the logical connection in a "no longer usable" state.

Returns:
The application-supplied connection, or null if Hibernate was managing connection.


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