|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.resource.internal.cm.jta.LocalXAResource
public final class LocalXAResource
A LocalXAWrapper that intercepts the XA calls for an RAR that only supports LocalTransactions and translates them to the appropriate Local Transaction methods.
Field Summary | |
---|---|
protected boolean |
isInTransaction
The boolean to determine if in a current transaction |
protected LocalTransaction |
localTrans
The LocalTransaction object to make the begin(), commit(), and rollback() calls. |
Fields inherited from interface javax.transaction.xa.XAResource |
---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Constructor Summary | |
---|---|
LocalXAResource(LocalTransaction _localTrans,
org.objectweb.util.monolog.api.Logger _logger)
|
Method Summary | |
---|---|
void |
commit(Xid xid,
boolean flag)
Commit the localTransaction, the params aren't used for a local transaction. |
void |
end(Xid xid,
int i)
No method to map for a local transaction. |
void |
forget(Xid xid)
No method to map for a local transaction. |
int |
getTransactionTimeout()
No method to map for a local transaction, just return no timeout. |
boolean |
isSameRM(XAResource xaresource)
Determine if the wrapper instance is the same as the wrapper instance being passed in |
int |
prepare(Xid xid)
No method to map for a local transaction, just return XA_OK. |
Xid[] |
recover(int i)
No method to map for a local transaction. |
void |
rollback(Xid xid)
Rollback the localTransaction, the param isn't used for a local transaction. |
boolean |
setTransactionTimeout(int i)
No method to map for a local transaction, just return no timeout. |
void |
start(Xid xid,
int i)
Only start a local transaction if a new transaction is being attempted, just return if joining or resuming. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isInTransaction
protected LocalTransaction localTrans
Constructor Detail |
---|
public LocalXAResource(LocalTransaction _localTrans, org.objectweb.util.monolog.api.Logger _logger)
Method Detail |
---|
public void commit(Xid xid, boolean flag) throws XAException
commit
in interface XAResource
xid
- transaction xidflag
- for interface compliance
XAException
- Exception trying to commit local transactionpublic void end(Xid xid, int i) throws XAException
end
in interface XAResource
xid
- transaction xid
XAException
public void forget(Xid xid) throws XAException
forget
in interface XAResource
xid
- transaction xid
XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean isSameRM(XAResource xaresource) throws XAException
isSameRM
in interface XAResource
xaresource
- An XAResource object
XAException
- no throw in this implementationpublic int prepare(Xid xid) throws XAException
prepare
in interface XAResource
xid
- transaction xid
XAException
public Xid[] recover(int i) throws XAException
recover
in interface XAResource
XAException
public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
xid
- transaction xid
XAException
- Exception trying to rollback local transactionpublic boolean setTransactionTimeout(int i) throws XAException
setTransactionTimeout
in interface XAResource
XAException
public void start(Xid xid, int i) throws XAException
start
in interface XAResource
xid
- transaction xid
XAException
- Transaction already started or error
starting a new local transaction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |