|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 XAResourcexid - transaction xidflag - for interface compliance
XAException - Exception trying to commit local transaction
public void end(Xid xid,
int i)
throws XAException
end in interface XAResourcexid - transaction xid
XAException
public void forget(Xid xid)
throws XAException
forget in interface XAResourcexid - transaction xid
XAException
public int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAException
public boolean isSameRM(XAResource xaresource)
throws XAException
isSameRM in interface XAResourcexaresource - An XAResource object
XAException - no throw in this implementation
public int prepare(Xid xid)
throws XAException
prepare in interface XAResourcexid - transaction xid
XAException
public Xid[] recover(int i)
throws XAException
recover in interface XAResourceXAException
public void rollback(Xid xid)
throws XAException
rollback in interface XAResourcexid - transaction xid
XAException - Exception trying to rollback local transaction
public boolean setTransactionTimeout(int i)
throws XAException
setTransactionTimeout in interface XAResourceXAException
public void start(Xid xid,
int i)
throws XAException
start in interface XAResourcexid - 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 | |||||||||