|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.message.TraceObject
org.h2.jdbcx.JdbcXAConnection
public class JdbcXAConnection
This class provides support for distributed transactions. An application developer usually does not use this interface. It is used by the transaction manager internally.
| Field Summary |
|---|
| Fields inherited from class org.h2.message.TraceObject |
|---|
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, XID |
| Fields inherited from interface javax.transaction.xa.XAResource |
|---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Method Summary | |
|---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Register a new listener for the connection. |
void |
close()
Close the physical connection. |
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
Commit a transaction. |
void |
end(javax.transaction.xa.Xid xid,
int flags)
End a transaction. |
void |
forget(javax.transaction.xa.Xid xid)
Forget a transaction. |
java.sql.Connection |
getConnection()
Get a connection that is a handle to the physical connection. |
int |
getTransactionTimeout()
Get the transaction timeout. |
javax.transaction.xa.XAResource |
getXAResource()
Get the XAResource object. |
boolean |
isSameRM(javax.transaction.xa.XAResource xares)
Checks if this is the same XAResource. |
int |
prepare(javax.transaction.xa.Xid xid)
Prepare a transaction. |
javax.transaction.xa.Xid[] |
recover(int flag)
Get the list of prepared transaction branches. |
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Remove the event listener. |
void |
rollback(javax.transaction.xa.Xid xid)
Roll back a transaction. |
boolean |
setTransactionTimeout(int seconds)
Set the transaction timeout. |
void |
start(javax.transaction.xa.Xid xid,
int flags)
Start or continue to work on a transaction. |
java.lang.String |
toString()
INTERNAL |
| Methods inherited from class org.h2.message.TraceObject |
|---|
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTrace, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupported |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public javax.transaction.xa.XAResource getXAResource()
getXAResource in interface javax.sql.XAConnection
public void close()
throws java.sql.SQLException
close in interface javax.sql.PooledConnectionjava.sql.SQLException
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectionjava.sql.SQLExceptionpublic void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener in interface javax.sql.PooledConnectionlistener - the event listenerpublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener in interface javax.sql.PooledConnectionlistener - the event listenerpublic int getTransactionTimeout()
getTransactionTimeout in interface javax.transaction.xa.XAResourcepublic boolean setTransactionTimeout(int seconds)
setTransactionTimeout in interface javax.transaction.xa.XAResourceseconds - ignored
public boolean isSameRM(javax.transaction.xa.XAResource xares)
isSameRM in interface javax.transaction.xa.XAResourcexares - the other object
public javax.transaction.xa.Xid[] recover(int flag)
throws javax.transaction.xa.XAException
recover in interface javax.transaction.xa.XAResourceflag - TMSTARTRSCAN, TMENDRSCAN, or TMNOFLAGS. If no other flags are set,
TMNOFLAGS must be used.
javax.transaction.xa.XAException
public int prepare(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
prepare in interface javax.transaction.xa.XAResourcexid - the transaction id
javax.transaction.xa.XAExceptionpublic void forget(javax.transaction.xa.Xid xid)
forget in interface javax.transaction.xa.XAResourcexid - the transaction id
public void rollback(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
rollback in interface javax.transaction.xa.XAResourcexid - the transaction id
javax.transaction.xa.XAException
public void end(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
end in interface javax.transaction.xa.XAResourcexid - the transaction idflags - TMSUCCESS, TMFAIL, or TMSUSPEND
javax.transaction.xa.XAException
public void start(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
start in interface javax.transaction.xa.XAResourcexid - the transaction idflags - TMNOFLAGS, TMJOIN, or TMRESUME
javax.transaction.xa.XAException
public void commit(javax.transaction.xa.Xid xid,
boolean onePhase)
throws javax.transaction.xa.XAException
commit in interface javax.transaction.xa.XAResourcexid - the transaction idonePhase - use a one-phase protocol if true
javax.transaction.xa.XAExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||