public class LogicalConnectionProvidedImpl extends AbstractLogicalConnectionImplementor
resourceRegistry
Constructor and Description |
---|
LogicalConnectionProvidedImpl(java.sql.Connection providedConnection,
ResourceRegistry resourceRegistry) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterCompletion() |
java.sql.Connection |
close()
Closes the JdbcSession, making it inactive and forcing release of any held resources
|
static LogicalConnectionProvidedImpl |
deserialize(java.io.ObjectInputStream ois) |
protected java.sql.Connection |
getConnectionForTransactionManagement() |
PhysicalConnectionHandlingMode |
getConnectionHandlingMode() |
java.sql.Connection |
getPhysicalConnection()
Exposes access to the "real" Connection.
|
boolean |
isOpen()
Is this (logical) JDBC Connection still open/active.
|
boolean |
isPhysicallyConnected()
Is this JdbcSession currently physically connected (meaning does it currently hold a JDBC Connection)?
|
LogicalConnectionImplementor |
makeShareableCopy()
Creates a shareable copy of itself for use in "shared sessions"
|
java.sql.Connection |
manualDisconnect()
Manually disconnect the underlying JDBC Connection.
|
void |
manualReconnect(java.sql.Connection connection)
Manually reconnect the underlying JDBC Connection.
|
void |
serialize(java.io.ObjectOutputStream oos)
Serialization hook
|
afterStatement, afterTransaction, begin, commit, determineInitialAutoCommitMode, doConnectionsFromProviderHaveAutoCommitDisabled, errorIfClosed, getPhysicalJdbcTransaction, getResourceRegistry, getStatus, resetConnection, rollback
public LogicalConnectionProvidedImpl(java.sql.Connection providedConnection, ResourceRegistry resourceRegistry)
public PhysicalConnectionHandlingMode getConnectionHandlingMode()
public boolean isOpen()
LogicalConnection
LogicalConnection.close()
not been called yet?true
if still open (LogicalConnection.close()
has not been called yet); false
if not open
((LogicalConnection.close()
has been called).public java.sql.Connection close()
LogicalConnection
public boolean isPhysicallyConnected()
LogicalConnection
true
if the JdbcSession currently hold a JDBC Connection; false
if it does not.public java.sql.Connection getPhysicalConnection()
LogicalConnectionImplementor
public LogicalConnectionImplementor makeShareableCopy()
LogicalConnectionImplementor
public void serialize(java.io.ObjectOutputStream oos) throws java.io.IOException
LogicalConnectionImplementor
oos
- The stream to write out state tojava.io.IOException
- Problem accessing streampublic static LogicalConnectionProvidedImpl deserialize(java.io.ObjectInputStream ois) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.sql.Connection manualDisconnect()
LogicalConnectionImplementor
null
if
there was no connection cached internally.public void manualReconnect(java.sql.Connection connection)
LogicalConnectionImplementor
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.protected java.sql.Connection getConnectionForTransactionManagement()
getConnectionForTransactionManagement
in class AbstractLogicalConnectionImplementor
protected void afterCompletion()
afterCompletion
in class AbstractLogicalConnectionImplementor
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.