com.atomikos.jdbc
Class ExclusiveExternalXAPooledConnectionImp
java.lang.Object
com.atomikos.jdbc.ExternalXAPooledConnectionImp
com.atomikos.jdbc.ExclusiveExternalXAPooledConnectionImp
- All Implemented Interfaces:
- Synchronization, DTPPooledConnection, XPooledConnection, Serializable, EventListener, ConnectionEventListener, PooledConnection
public class ExclusiveExternalXAPooledConnectionImp
- extends ExternalXAPooledConnectionImp
- implements Synchronization
A non-shared implementation of a pooled connection. Some DBs such as Oracle
or SQLServer deviate from the standard in the moment where an XAResource can
be reused. This has to be AFTER 2PC (contrary to standard). Instances of this
class will generate TWO close events, and only the second will have
isDiscarded set to true.
- See Also:
- Serialized Form
Fields inherited from class com.atomikos.jdbc.ExternalXAPooledConnectionImp |
connectionProxy_, creationTime_, discarded_, invalidated_, lastUse_, listeners_, logWriter_, msg_, myConn_, resource_, restx_ |
Methods inherited from class com.atomikos.jdbc.ExternalXAPooledConnectionImp |
addConnectionEventListener, close, connectionErrorOccurred, getConnection, getConnection, getInvalidated, getLastUse, getTransactionalResource, isDiscarded, isInResourceTransaction, removeConnectionEventListener, setDiscarded, setInvalidated, setLastUse, suspendResourceTransaction, toString, unsetResourceTransaction |
ExclusiveExternalXAPooledConnectionImp
public ExclusiveExternalXAPooledConnectionImp(XAConnection c,
TransactionalResource res)
ExclusiveExternalXAPooledConnectionImp
public ExclusiveExternalXAPooledConnectionImp(XAConnection c,
TransactionalResource res,
PrintWriter logWriter)
setResourceTransaction
public void setResourceTransaction(ResourceTransaction restx)
throws SQLException
- Description copied from interface:
DTPPooledConnection
- Associate a resource transaction with this connection. After returning,
the resource transaction should be ready for resume() calls.
- Specified by:
setResourceTransaction
in interface DTPPooledConnection
- Overrides:
setResourceTransaction
in class ExternalXAPooledConnectionImp
- Parameters:
restx
- The resource transaction to be associated with this
connection.
- Throws:
SQLException
- If a SQL error occurs.
beforeCompletion
public void beforeCompletion()
- Description copied from interface:
Synchronization
- Called before prepare decision is made.
- Specified by:
beforeCompletion
in interface Synchronization
afterCompletion
public void afterCompletion(Object state)
- Description copied from interface:
Synchronization
- Called after the overall outcome is known.
- Specified by:
afterCompletion
in interface Synchronization
- Parameters:
state
- The state of the coordinator after preparing.
Equals either null ( readonly ), TxState.COMMITTING or TxState.ABORTING.
connectionClosed
public void connectionClosed(ConnectionEvent e)
- Specified by:
connectionClosed
in interface ConnectionEventListener
- Overrides:
connectionClosed
in class ExternalXAPooledConnectionImp
Copyright © 2011. All Rights Reserved.