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, STATEMENT, trace, XA_DATA_SOURCE, XIDTMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Register a new listener for the connection.
|
void |
addStatementEventListener(StatementEventListener listener)
[Not supported] Add a statement event listener.
|
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 |
removeStatementEventListener(StatementEventListener listener)
[Not supported] Remove a statement 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, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupportedpublic XAResource getXAResource()
getXAResource 在接口中 XAConnectionpublic void close()
throws SQLException
close 在接口中 PooledConnectionSQLExceptionpublic Connection getConnection() throws SQLException
getConnection 在接口中 PooledConnectionSQLExceptionpublic void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener 在接口中 PooledConnectionlistener - the event listenerpublic void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener 在接口中 PooledConnectionlistener - the event listenerpublic int getTransactionTimeout()
getTransactionTimeout 在接口中 XAResourcepublic boolean setTransactionTimeout(int seconds)
setTransactionTimeout 在接口中 XAResourceseconds - ignoredpublic boolean isSameRM(XAResource xares)
isSameRM 在接口中 XAResourcexares - the other objectpublic Xid[] recover(int flag) throws XAException
recover 在接口中 XAResourceflag - TMSTARTRSCAN, TMENDRSCAN, or TMNOFLAGS. If no other flags are
set, TMNOFLAGS must be used.XAExceptionpublic int prepare(Xid xid) throws XAException
prepare 在接口中 XAResourcexid - the transaction idXAExceptionpublic void forget(Xid xid)
forget 在接口中 XAResourcexid - the transaction idpublic void rollback(Xid xid) throws XAException
rollback 在接口中 XAResourcexid - the transaction idXAExceptionpublic void end(Xid xid, int flags) throws XAException
end 在接口中 XAResourcexid - the transaction idflags - TMSUCCESS, TMFAIL, or TMSUSPENDXAExceptionpublic void start(Xid xid, int flags) throws XAException
start 在接口中 XAResourcexid - the transaction idflags - TMNOFLAGS, TMJOIN, or TMRESUMEXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit 在接口中 XAResourcexid - the transaction idonePhase - use a one-phase protocol if trueXAExceptionpublic void addStatementEventListener(StatementEventListener listener)
addStatementEventListener 在接口中 PooledConnectionlistener - the new statement event listenerpublic void removeStatementEventListener(StatementEventListener listener)
removeStatementEventListener 在接口中 PooledConnectionlistener - the statement event listenerCopyright © 2017. All rights reserved.