|
||||||||||
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, XA_DATA_SOURCE, 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 |
addStatementEventListener(javax.sql.StatementEventListener listener)
[Not supported] Add a statement event listener. |
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 |
removeStatementEventListener(javax.sql.StatementEventListener listener)
[Not supported] Remove a statement 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, setTrace, toString, 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.PooledConnection
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
listener
- the event listenerpublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
listener
- the event listenerpublic int getTransactionTimeout()
getTransactionTimeout
in interface javax.transaction.xa.XAResource
public boolean setTransactionTimeout(int seconds)
setTransactionTimeout
in interface javax.transaction.xa.XAResource
seconds
- ignored
public boolean isSameRM(javax.transaction.xa.XAResource xares)
isSameRM
in interface javax.transaction.xa.XAResource
xares
- the other object
public javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
recover
in interface javax.transaction.xa.XAResource
flag
- 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.XAResource
xid
- the transaction id
javax.transaction.xa.XAException
public void forget(javax.transaction.xa.Xid xid)
forget
in interface javax.transaction.xa.XAResource
xid
- the transaction idpublic void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
rollback
in interface javax.transaction.xa.XAResource
xid
- 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.XAResource
xid
- 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.XAResource
xid
- 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.XAResource
xid
- the transaction idonePhase
- use a one-phase protocol if true
javax.transaction.xa.XAException
public void addStatementEventListener(javax.sql.StatementEventListener listener)
addStatementEventListener
in interface javax.sql.PooledConnection
listener
- the new statement event listenerpublic void removeStatementEventListener(javax.sql.StatementEventListener listener)
removeStatementEventListener
in interface javax.sql.PooledConnection
listener
- the statement event listenerpublic 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 |