bitronix.tm.resource.jms.lrc
Class LrcXAResource
java.lang.Object
bitronix.tm.resource.jms.lrc.LrcXAResource
- All Implemented Interfaces:
- XAResource
public class LrcXAResource
- extends Object
- implements XAResource
XAResource implementation for a non-XA JMS connection emulating XA with Last Resource Commit.
The XA protocol flow is implemented by this state machine:
NO_TX
|
| start(TMNOFLAGS)
|
| end(TMFAIL)
STARTED -------------- NO_TX
|
| end(TMSUCCESS)
|
| start(TMJOIN)
ENDED ---------------- STARTED
|\
| \ commit (one phase)
| ----------------- NO_TX
|
| prepare()
|
| commit() or
| rollback()
PREPARED ------------- NO_TX
XAResource.TMSUSPEND
and XAResource.TMRESUME
are not supported.
- Author:
- lorban
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
NO_TX
public static final int NO_TX
- See Also:
- Constant Field Values
STARTED
public static final int STARTED
- See Also:
- Constant Field Values
ENDED
public static final int ENDED
- See Also:
- Constant Field Values
PREPARED
public static final int PREPARED
- See Also:
- Constant Field Values
LrcXAResource
public LrcXAResource(javax.jms.Session session)
getState
public int getState()
getTransactionTimeout
public int getTransactionTimeout()
throws XAException
- Specified by:
getTransactionTimeout
in interface XAResource
- Throws:
XAException
setTransactionTimeout
public boolean setTransactionTimeout(int seconds)
throws XAException
- Specified by:
setTransactionTimeout
in interface XAResource
- Throws:
XAException
forget
public void forget(Xid xid)
throws XAException
- Specified by:
forget
in interface XAResource
- Throws:
XAException
recover
public Xid[] recover(int flags)
throws XAException
- Specified by:
recover
in interface XAResource
- Throws:
XAException
isSameRM
public boolean isSameRM(XAResource xaResource)
throws XAException
- Specified by:
isSameRM
in interface XAResource
- Throws:
XAException
start
public void start(Xid xid,
int flag)
throws XAException
- Specified by:
start
in interface XAResource
- Throws:
XAException
end
public void end(Xid xid,
int flag)
throws XAException
- Specified by:
end
in interface XAResource
- Throws:
XAException
prepare
public int prepare(Xid xid)
throws XAException
- Specified by:
prepare
in interface XAResource
- Throws:
XAException
commit
public void commit(Xid xid,
boolean onePhase)
throws XAException
- Specified by:
commit
in interface XAResource
- Throws:
XAException
rollback
public void rollback(Xid xid)
throws XAException
- Specified by:
rollback
in interface XAResource
- Throws:
XAException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2006-2011 Bitronix Software. All Rights Reserved.