类 LogicalConnectionProvidedImpl
- java.lang.Object
-
- org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor
-
- org.hibernate.resource.jdbc.internal.LogicalConnectionProvidedImpl
-
- 所有已实现的接口:
LogicalConnection,LogicalConnectionImplementor,PhysicalJdbcTransaction,JdbcResourceTransaction
public class LogicalConnectionProvidedImpl extends AbstractLogicalConnectionImplementor
- 作者:
- Steve Ebersole
-
-
字段概要
-
从类继承的字段 org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor
resourceRegistry
-
-
构造器概要
构造器 构造器 说明 LogicalConnectionProvidedImpl(Connection providedConnection, ResourceRegistry resourceRegistry)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidafterCompletion()Connectionclose()Closes the JdbcSession, making it inactive and forcing release of any held resourcesstatic LogicalConnectionProvidedImpldeserialize(ObjectInputStream ois)protected ConnectiongetConnectionForTransactionManagement()PhysicalConnectionHandlingModegetConnectionHandlingMode()ConnectiongetPhysicalConnection()Exposes access to the "real" Connection.booleanisOpen()Is this (logical) JDBC Connection still open/active.booleanisPhysicallyConnected()Is this JdbcSession currently physically connected (meaning does it currently hold a JDBC Connection)?LogicalConnectionImplementormakeShareableCopy()Creates a shareable copy of itself for use in "shared sessions"ConnectionmanualDisconnect()Manually disconnect the underlying JDBC Connection.voidmanualReconnect(Connection connection)Manually reconnect the underlying JDBC Connection.voidserialize(ObjectOutputStream oos)Serialization hook-
从类继承的方法 org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor
afterStatement, afterTransaction, begin, commit, determineInitialAutoCommitMode, doConnectionsFromProviderHaveAutoCommitDisabled, errorIfClosed, getPhysicalJdbcTransaction, getResourceRegistry, getStatus, resetConnection, rollback
-
-
-
-
构造器详细资料
-
LogicalConnectionProvidedImpl
public LogicalConnectionProvidedImpl(Connection providedConnection, ResourceRegistry resourceRegistry)
-
-
方法详细资料
-
getConnectionHandlingMode
public PhysicalConnectionHandlingMode getConnectionHandlingMode()
-
isOpen
public boolean isOpen()
从接口复制的说明:LogicalConnectionIs this (logical) JDBC Connection still open/active. In other words, hasLogicalConnection.close()not been called yet?- 返回:
trueif still open (LogicalConnection.close()has not been called yet);falseif not open (LogicalConnection.close()has been called).
-
close
public Connection close()
从接口复制的说明:LogicalConnectionCloses the JdbcSession, making it inactive and forcing release of any held resources- 返回:
- Legacy :( Returns the JDBC Connection *if* the user passed in a Connection originally.
-
isPhysicallyConnected
public boolean isPhysicallyConnected()
从接口复制的说明:LogicalConnectionIs this JdbcSession currently physically connected (meaning does it currently hold a JDBC Connection)?- 返回:
trueif the JdbcSession currently hold a JDBC Connection;falseif it does not.
-
getPhysicalConnection
public Connection getPhysicalConnection()
从接口复制的说明:LogicalConnectionImplementorExposes access to the "real" Connection.- 返回:
- The connection
-
makeShareableCopy
public LogicalConnectionImplementor makeShareableCopy()
从接口复制的说明:LogicalConnectionImplementorCreates a shareable copy of itself for use in "shared sessions"- 返回:
- The shareable copy.
-
serialize
public void serialize(ObjectOutputStream oos) throws IOException
从接口复制的说明:LogicalConnectionImplementorSerialization hook- 参数:
oos- The stream to write out state to- 抛出:
IOException- Problem accessing stream
-
deserialize
public static LogicalConnectionProvidedImpl deserialize(ObjectInputStream ois) throws IOException, ClassNotFoundException
-
manualDisconnect
public Connection manualDisconnect()
从接口复制的说明:LogicalConnectionImplementorManually disconnect the underlying JDBC Connection. The assumption here is that the manager will be reconnected at a later point in time.- 返回:
- The connection maintained here at time of disconnect.
nullif there was no connection cached internally.
-
manualReconnect
public void manualReconnect(Connection connection)
从接口复制的说明:LogicalConnectionImplementorManually reconnect the underlying JDBC Connection. Should be called at some point after manualDisconnect().- 参数:
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.
-
getConnectionForTransactionManagement
protected Connection getConnectionForTransactionManagement()
-
afterCompletion
protected void afterCompletion()
-
-