Top Description Methods
org.hibernate.resource.jdbc

public Interface LogicalConnection

Known Direct Subinterfaces
org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor
Imports
java.sql.Connection

Represents a continuous logical connection to the database to the database via JDBC.

Under the covers, a physical JDBC Connection might be acquired and then released multiple times, but those details are hidden from clients.

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public Connection

Returns:

the JDBC Connection if the user passed in a Connection originally
close
()

Closes the logical connection, making it inactive and forcing release of any held resources.

public ResourceRegistry

Returns:

The JDBC resource registry.
getResourceRegistry
()

Provides access to the registry of JDBC resources associated with this logical connection.

public boolean

Returns:

true if still open, since close has not yet been called; false if not open, since close was called.
isOpen
()

Is this (logical) JDBC connection still open/active?

public boolean

Returns:

true if currently holding a JDBC Connection; false if not.
isPhysicallyConnected
()

Is this logical connection currently physically connected?

Method Detail

closeback to summary
public Connection close()

Closes the logical connection, making it inactive and forcing release of any held resources.

API Note

The return type accommodates legacy functionality for user-supplied connections.

Returns:Connection

the JDBC Connection if the user passed in a Connection originally

getResourceRegistryback to summary
public ResourceRegistry getResourceRegistry()

Provides access to the registry of JDBC resources associated with this logical connection.

Returns:ResourceRegistry

The JDBC resource registry.

Exceptions
ResourceClosedException:
if the LogicalConnection is closed
isOpenback to summary
public boolean isOpen()

Is this (logical) JDBC connection still open/active?

That is, has close not yet been called?

Returns:boolean

true if still open, since close has not yet been called; false if not open, since close was called.

isPhysicallyConnectedback to summary
public boolean isPhysicallyConnected()

Is this logical connection currently physically connected?

That is, does it currently hold a physical JDBC Connection?

Returns:boolean

true if currently holding a JDBC Connection; false if not.