
public class XAManagedConnection extends BaseWrapperManagedConnection implements XAResource, javax.resource.spi.LocalTransaction
| Modifier and Type | Field and Description |
|---|---|
protected Xid |
currentXid
The Xid
|
protected XAConnection |
xaConnection
The XA connection
|
protected XAResource |
xaResource
The XAResource
|
con, destroyed, ignoreInManagedAutoCommitCalls, inLocalTransaction, inManagedTransaction, jdbcAutoCommit, jdbcReadOnly, jdbcTransactionIsolation, mcf, metadata, props, stateLock, underlyingAutoCommit, underlyingReadOnlyTMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Constructor and Description |
|---|
XAManagedConnection(XAManagedConnectionFactory mcf,
XAConnection xaConnection,
Properties props,
int transactionIsolation,
int psCacheSize)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin() |
protected void |
broadcastConnectionError(SQLException e) |
void |
commit() |
void |
commit(Xid xid,
boolean onePhase) |
void |
destroy()
Destroy
|
void |
end(Xid xid,
int flags) |
void |
forget(Xid xid) |
javax.resource.spi.LocalTransaction |
getLocalTransaction() |
int |
getTransactionTimeout() |
XAResource |
getXAResource() |
boolean |
isSameRM(XAResource other) |
boolean |
isXA()
Returns true if the underlying connection is handled by an XA resource manager
|
int |
prepare(Xid xid) |
Xid[] |
recover(int flag) |
void |
rollback() |
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds) |
void |
start(Xid xid,
int flags) |
addConnectionEventListener, associateConnection, broadcastConnectionError, checkException, checkState, checkValid, cleanup, getConnection, getConnection, getLog, getLogWriter, getMetaData, getProperties, lock, removeConnectionEventListener, setConnectableResourceListener, setLogWriter, tryLock, unlockprotected final XAConnection xaConnection
protected final XAResource xaResource
protected Xid currentXid
public XAManagedConnection(XAManagedConnectionFactory mcf, XAConnection xaConnection, Properties props, int transactionIsolation, int psCacheSize) throws SQLException
mcf - The managed connection factoryxaConnection - The XA connectionprops - The propertiestransactionIsolation - The transaction isolationpsCacheSize - The prepared statement cache sizeSQLException - Thrown if an error occurspublic void begin()
throws javax.resource.ResourceException
begin in interface javax.resource.spi.LocalTransactionjavax.resource.ResourceExceptionpublic void commit()
throws javax.resource.ResourceException
commit in interface javax.resource.spi.LocalTransactionjavax.resource.ResourceExceptionpublic void rollback()
throws javax.resource.ResourceException
rollback in interface javax.resource.spi.LocalTransactionjavax.resource.ResourceExceptionprotected void broadcastConnectionError(SQLException e)
public javax.resource.spi.LocalTransaction getLocalTransaction()
throws javax.resource.ResourceException
getLocalTransaction in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceExceptionpublic XAResource getXAResource() throws javax.resource.ResourceException
getXAResource in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceExceptionpublic void destroy()
throws javax.resource.ResourceException
destroy in interface javax.resource.spi.ManagedConnectiondestroy in class BaseWrapperManagedConnectionjavax.resource.ResourceException - Thrown if an error occurspublic void start(Xid xid, int flags) throws XAException
start in interface XAResourceXAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourceXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic Xid[] recover(int flag) throws XAException
recover in interface XAResourceXAExceptionpublic boolean isSameRM(XAResource other) throws XAException
isSameRM in interface XAResourceXAExceptionpublic int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceXAExceptionpublic boolean isXA()
isXA in class BaseWrapperManagedConnectionCopyright © 2013 IronJacamar (http://www.ironjacamar.org)