| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.engine.jdbc.internal.LogicalConnectionImpl
public class LogicalConnectionImpl
Standard Hibernate LogicalConnection implementation
 
| Constructor Summary | |
|---|---|
| LogicalConnectionImpl(Connection userSuppliedConnection,
                      ConnectionReleaseMode connectionReleaseMode,
                      JdbcServices jdbcServices,
                      JdbcConnectionAccess jdbcConnectionAccess) | |
| Method Summary | |
|---|---|
|  void | addObserver(ConnectionObserver observer)Add an observer interested in notification of connection events. | 
|  void | afterStatementExecution()Used to signify that a statement has completed execution which may indicate that this logical connection need to perform an aggressive release of its physical connection. | 
|  void | afterTransaction()Used to signify that a transaction has completed which may indicate that this logical connection need to perform an aggressive release of its physical connection. | 
|  void | aggressiveRelease()Force aggressive release of the underlying connection. | 
|  Connection | close()Release the underlying connection and clean up any other resources associated with this logical connection. | 
| static LogicalConnectionImpl | deserialize(ObjectInputStream ois,
            TransactionContext transactionContext) | 
|  void | disableReleases()Manually (and temporarily) circumvent aggressive release processing. | 
|  void | enableReleases()Re-enable aggressive release processing (after a prior LogicalConnectionImplementor.disableReleases()call. | 
|  Connection | getConnection()Retrieves the connection currently "logically" managed by this LogicalConnectionImpl. | 
|  ConnectionReleaseMode | getConnectionReleaseMode()The release mode under which this logical connection is operating. | 
|  Connection | getDistinctConnectionProxy()Retrieves a distinct connection proxy (see org.hibernate.engine.jdbc.internal.proxyfor details). | 
|  JdbcServices | getJdbcServices()Obtains the JDBC services associated with this logical connection. | 
|  JdbcResourceRegistry | getResourceRegistry()Obtains the JDBC resource registry associated with this logical connection. | 
|  Connection | getShareableConnectionProxy()Retrieves the shareable connection proxy (see org.hibernate.engine.jdbc.internal.proxyfor details). | 
|  boolean | isAutoCommit() | 
|  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. | 
|  boolean | isReadyForSerialization() | 
|  Connection | manualDisconnect()Manually disconnect the underlying JDBC Connection. | 
|  void | manualReconnect(Connection suppliedConnection)Manually reconnect the underlying JDBC Connection. | 
|  void | notifyObserversStatementPrepared() | 
|  void | removeObserver(ConnectionObserver connectionObserver)Remove an observer | 
|  void | serialize(ObjectOutputStream oos) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LogicalConnectionImpl(Connection userSuppliedConnection,
                             ConnectionReleaseMode connectionReleaseMode,
                             JdbcServices jdbcServices,
                             JdbcConnectionAccess jdbcConnectionAccess)
| Method Detail | 
|---|
public JdbcServices getJdbcServices()
LogicalConnectionImplementor
getJdbcServices in interface LogicalConnectionImplementorpublic JdbcResourceRegistry getResourceRegistry()
LogicalConnectionImplementor
getResourceRegistry in interface LogicalConnectionImplementorpublic void addObserver(ConnectionObserver observer)
LogicalConnectionImplementor
addObserver in interface LogicalConnectionImplementorobserver - The observer.public void removeObserver(ConnectionObserver connectionObserver)
LogicalConnectionImplementor
removeObserver in interface LogicalConnectionImplementorconnectionObserver - The observer to remove.public boolean isOpen()
LogicalConnection
isOpen in interface LogicalConnectionpublic boolean isPhysicallyConnected()
LogicalConnection
isPhysicallyConnected in interface LogicalConnection
public Connection getConnection()
                         throws HibernateException
LogicalConnection
getConnection in interface LogicalConnectionHibernateExceptionpublic Connection getShareableConnectionProxy()
LogicalConnectionorg.hibernate.engine.jdbc.internal.proxy for details).
getShareableConnectionProxy in interface LogicalConnectionpublic Connection getDistinctConnectionProxy()
LogicalConnectionorg.hibernate.engine.jdbc.internal.proxy for details).  It
 is distinct in that it is not shared with others unless the caller explicitly shares it.
getDistinctConnectionProxy in interface LogicalConnectionpublic Connection close()
LogicalConnection
close in interface LogicalConnectionnull if Hibernate was managing connection.public ConnectionReleaseMode getConnectionReleaseMode()
LogicalConnectionImplementor
getConnectionReleaseMode in interface LogicalConnectionImplementorpublic void afterStatementExecution()
LogicalConnectionImplementor
afterStatementExecution in interface LogicalConnectionImplementorpublic void afterTransaction()
LogicalConnectionImplementor
afterTransaction in interface LogicalConnectionafterTransaction in interface LogicalConnectionImplementorpublic void disableReleases()
LogicalConnectionImplementor
disableReleases in interface LogicalConnectionImplementorpublic void enableReleases()
LogicalConnectionImplementorLogicalConnectionImplementor.disableReleases() call.
enableReleases in interface LogicalConnectionImplementorpublic void aggressiveRelease()
public Connection manualDisconnect()
LogicalConnectionImplementor
manualDisconnect in interface LogicalConnectionImplementorpublic void manualReconnect(Connection suppliedConnection)
LogicalConnectionImplementor
manualReconnect in interface LogicalConnectionImplementorsuppliedConnection - 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.public boolean isAutoCommit()
isAutoCommit in interface LogicalConnectionImplementorpublic void notifyObserversStatementPrepared()
notifyObserversStatementPrepared in interface LogicalConnectionImplementorpublic boolean isReadyForSerialization()
isReadyForSerialization in interface LogicalConnectionImplementor
public void serialize(ObjectOutputStream oos)
               throws IOException
IOException
public static LogicalConnectionImpl deserialize(ObjectInputStream ois,
                                                TransactionContext transactionContext)
                                         throws IOException,
                                                ClassNotFoundException
IOException
ClassNotFoundException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||