|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.jonas.ee.jdbc.XAResourceImpl
public class XAResourceImpl
This is an implementation of XAResource used for transaction mgmt with a JDBC driver. The standard JDBC drivers don't support real XA, so the prepare will just return OK and work will be done in the commit/rollback.
| Field Summary | |
|---|---|
protected ManagedConnectionImpl |
mc
|
| Fields inherited from interface javax.transaction.xa.XAResource |
|---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Constructor Summary | |
|---|---|
XAResourceImpl(ManagedConnectionImpl mc,
XAResource xares)
XAResourceImpl constructor |
|
| Method Summary | |
|---|---|
void |
commit(Xid xid,
boolean onePhase)
Commit the global transaction specified by xid. |
void |
end(Xid xid,
int flags)
Ends the transaction |
void |
forget(Xid xid)
Need to forget the heuristically completed Xid |
int |
getTransactionTimeout()
Get the current transaction timeout for this XAResource |
boolean |
isSameRM(XAResource xaRes)
Determine if the resource manager instance is the same as the resouce manager being passed in |
int |
prepare(Xid xid)
Prepare the Xid for a transaction commit |
Xid[] |
recover(int flag)
Obtain a list of prepared transaction branches from a resource manager. |
void |
rollback(Xid xid)
Roll back work done on the Xid |
boolean |
setTransactionTimeout(int seconds)
Set the current transaction timeout value for this XAResource |
void |
start(Xid xid,
int flags)
Start work on this Xid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ManagedConnectionImpl mc
| Constructor Detail |
|---|
public XAResourceImpl(ManagedConnectionImpl mc,
XAResource xares)
mc - ManagedConnectionImpl used with this objectxares - XAResource from DB if supported| Method Detail |
|---|
public void commit(Xid xid,
boolean onePhase)
throws XAException
commit in interface XAResourceXAException
public void end(Xid xid,
int flags)
throws XAException
end in interface XAResourceXAException
public void forget(Xid xid)
throws XAException
forget in interface XAResourceXAException
public int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAException
public boolean isSameRM(XAResource xaRes)
throws XAException
isSameRM in interface XAResourceXAException
public int prepare(Xid xid)
throws XAException
prepare in interface XAResourceXAException
public Xid[] recover(int flag)
throws XAException
recover in interface XAResourceXAException
public void rollback(Xid xid)
throws XAException
rollback in interface XAResourceXAException
public boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceXAException
public void start(Xid xid,
int flags)
throws XAException
start in interface XAResourceXAException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||