|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
|
protected org.objectweb.util.monolog.api.Logger |
xalog
|
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
protected org.objectweb.util.monolog.api.Logger xalog
Constructor Detail |
---|
public XAResourceImpl(ManagedConnectionImpl mc, XAResource xares)
mc
- ManagedConnectionImpl used with this objectxares
- XAResource from DB if supportedMethod Detail |
---|
public void commit(Xid xid, boolean onePhase) throws XAException
commit
in interface XAResource
XAException
public void end(Xid xid, int flags) throws XAException
end
in interface XAResource
xid
- transaction xidflags
- One of TMSUCCESS, TMFAIL, or TMSUSPEND.
XAException
public void forget(Xid xid) throws XAException
forget
in interface XAResource
XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean isSameRM(XAResource xaRes) throws XAException
isSameRM
in interface XAResource
XAException
public int prepare(Xid xid) throws XAException
prepare
in interface XAResource
XAException
public Xid[] recover(int flag) throws XAException
recover
in interface XAResource
XAException
public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
XAException
public boolean setTransactionTimeout(int seconds) throws XAException
setTransactionTimeout
in interface XAResource
XAException
public void start(Xid xid, int flags) throws XAException
start
in interface XAResource
XAException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |