org.activemq.ra
Class RATransactionContext
java.lang.Object
org.activemq.TransactionContext
org.activemq.ra.RATransactionContext
- All Implemented Interfaces:
- XAResource
- public class RATransactionContext
- extends org.activemq.TransactionContext
Allows us to switch between using a shared transaction context,
or using a local transaction context.
- Version:
- $Revision: 1.1.1.1 $
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Methods inherited from class org.activemq.TransactionContext |
getConnection, getLocalTransactionEventListener, setLocalTransactionEventListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RATransactionContext
public RATransactionContext(org.activemq.TransactionContext sharedContext)
setUseSharedTxContext
public void setUseSharedTxContext(boolean enable)
throws JMSException
- Throws:
JMSException
addSession
public void addSession(org.activemq.ActiveMQSession session)
removeSession
public void removeSession(org.activemq.ActiveMQSession session)
begin
public void begin()
throws JMSException
- Throws:
JMSException
commit
public void commit()
throws JMSException
- Throws:
JMSException
commit
public void commit(Xid xid,
boolean onePhase)
throws XAException
- Throws:
XAException
end
public void end(Xid xid,
int flags)
throws XAException
- Throws:
XAException
forget
public void forget(Xid xid)
throws XAException
- Throws:
XAException
getTransactionId
public Object getTransactionId()
getTransactionTimeout
public int getTransactionTimeout()
throws XAException
- Throws:
XAException
isInLocalTransaction
public boolean isInLocalTransaction()
isInXATransaction
public boolean isInXATransaction()
isSameRM
public boolean isSameRM(XAResource xaResource)
throws XAException
- Throws:
XAException
prepare
public int prepare(Xid xid)
throws XAException
- Throws:
XAException
recover
public Xid[] recover(int flag)
throws XAException
- Throws:
XAException
rollback
public void rollback()
throws JMSException
- Throws:
JMSException
rollback
public void rollback(Xid xid)
throws XAException
- Throws:
XAException
setTransactionTimeout
public boolean setTransactionTimeout(int seconds)
throws XAException
- Throws:
XAException
start
public void start(Xid xid,
int flags)
throws XAException
- Throws:
XAException
Copyright © 2004-2007 Protique, Ltd.. All Rights Reserved.