Package org.hibernate.resource.jdbc
Interface LogicalConnection
-
- All Known Subinterfaces:
LogicalConnectionImplementor
- All Known Implementing Classes:
AbstractLogicalConnectionImplementor,LogicalConnectionManagedImpl,LogicalConnectionProvidedImpl
public interface LogicalConnectionRepresents a continuous logical connection to the database to the database via JDBC.Under the covers, a physical JDBC
Connectionmight be acquired and then released multiple times, but those details are hidden from clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Connectionclose()Closes the logical connection, making it inactive and forcing release of any held resources.ResourceRegistrygetResourceRegistry()Provides access to the registry of JDBC resources associated with this logical connection.booleanisOpen()Is this (logical) JDBC connection still open/active?booleanisPhysicallyConnected()Is this logical connection currently physically connected?
-
-
-
Method Detail
-
isOpen
boolean isOpen()
Is this (logical) JDBC connection still open/active?That is, has
close()not yet been called?
-
close
Connection close()
Closes the logical connection, making it inactive and forcing release of any held resources.- Returns:
- the JDBC
Connectionif the user passed in aConnectionoriginally - API Note:
- The return type accommodates legacy functionality for user-supplied connections.
-
isPhysicallyConnected
boolean isPhysicallyConnected()
Is this logical connection currently physically connected?That is, does it currently hold a physical JDBC
Connection?- Returns:
trueif currently holding a JDBCConnection;falseif not.
-
getResourceRegistry
ResourceRegistry getResourceRegistry()
Provides access to the registry of JDBC resources associated with this logical connection.- Returns:
- The JDBC resource registry.
- Throws:
ResourceClosedException- if theLogicalConnectionis closed
-
-