|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas.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,
javax.transaction.xa.XAResource xares)
XAResourceImpl constructor |
Method Summary | |
---|---|
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
Commit the global transaction specified by xid. |
void |
end(javax.transaction.xa.Xid xid,
int flags)
Ends the transaction |
void |
forget(javax.transaction.xa.Xid xid)
Need to forget the heuristically completed Xid |
int |
getTransactionTimeout()
Get the current transaction timeout for this XAResource |
boolean |
isSameRM(javax.transaction.xa.XAResource xaRes)
Determine if the resource manager instance is the same as the resouce manager being passed in |
int |
prepare(javax.transaction.xa.Xid xid)
Prepare the Xid for a transaction commit |
javax.transaction.xa.Xid[] |
recover(int flag)
Obtain a list of prepared transaction branches from a resource manager. |
void |
rollback(javax.transaction.xa.Xid xid)
Roll back work done on the Xid |
boolean |
setTransactionTimeout(int seconds)
Set the current transaction timeout value for this XAResource |
void |
start(javax.transaction.xa.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, javax.transaction.xa.XAResource xares)
mc
- ManagedConnectionImpl used with this objectxares
- XAResource from DB if supportedMethod Detail |
---|
public void commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException
commit
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void end(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
end
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
forget
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public int getTransactionTimeout() throws javax.transaction.xa.XAException
getTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean isSameRM(javax.transaction.xa.XAResource xaRes) throws javax.transaction.xa.XAException
isSameRM
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
prepare
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
recover
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
rollback
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean setTransactionTimeout(int seconds) throws javax.transaction.xa.XAException
setTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void start(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
start
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |