public class JdbcXAConnection extends TraceObject implements XAConnection, XAResource
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQL_EXCEPTION, STATEMENT, trace, XA_DATA_SOURCE, XA_RESOURCE, XIDTMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Register a new listener for the connection.
|
void |
close()
Close the physical connection.
|
void |
commit(Xid xid,
boolean onePhase)
Commit a transaction.
|
void |
end(Xid xid,
int flags)
End a transaction.
|
void |
forget(Xid xid)
Forget a transaction.
|
Connection |
getConnection()
Get a connection that is a handle to the physical connection.
|
int |
getTransactionTimeout()
Get the transaction timeout.
|
XAResource |
getXAResource()
Get the XAResource object.
|
boolean |
isSameRM(XAResource xares)
Checks if this is the same XAResource.
|
int |
prepare(Xid xid)
Prepare a transaction.
|
Xid[] |
recover(int flag)
Get the list of prepared transaction branches.
|
void |
removeConnectionEventListener(ConnectionEventListener listener)
Remove the event listener.
|
void |
rollback(Xid xid)
Roll back a transaction.
|
boolean |
setTransactionTimeout(int seconds)
Set the transaction timeout.
|
void |
start(Xid xid,
int flags)
Start or continue to work on a transaction.
|
String |
toString()
INTERNAL
|
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTrace, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupportedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddStatementEventListener, removeStatementEventListenerpublic XAResource getXAResource()
getXAResource in interface XAConnectionpublic void close()
throws SQLException
close in interface PooledConnectionSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface PooledConnectionSQLExceptionpublic void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener in interface PooledConnectionlistener - the event listenerpublic void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener in interface PooledConnectionlistener - the event listenerpublic int getTransactionTimeout()
getTransactionTimeout in interface XAResourcepublic boolean setTransactionTimeout(int seconds)
setTransactionTimeout in interface XAResourceseconds - ignoredpublic boolean isSameRM(XAResource xares)
isSameRM in interface XAResourcexares - the other objectpublic Xid[] recover(int flag) throws XAException
recover in interface XAResourceflag - TMSTARTRSCAN, TMENDRSCAN, or TMNOFLAGS. If no other flags are set,
TMNOFLAGS must be used.XAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourcexid - the transaction idXAExceptionpublic void forget(Xid xid)
forget in interface XAResourcexid - the transaction idpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourcexid - the transaction idXAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourcexid - the transaction idflags - TMSUCCESS, TMFAIL, or TMSUSPENDXAExceptionpublic void start(Xid xid, int flags) throws XAException
start in interface XAResourcexid - the transaction idflags - TMNOFLAGS, TMJOIN, or TMRESUMEXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourcexid - the transaction idonePhase - use a one-phase protocol if trueXAExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.