Package org.datanucleus.jdo.connector
Class ConnectionXAResource
- java.lang.Object
-
- org.datanucleus.jdo.connector.ConnectionXAResource
-
- All Implemented Interfaces:
XAResource
public class ConnectionXAResource extends Object implements XAResource
XAResource for the Connector. It is enlisted in the XA transaction when the DataNucleus Connector is allocated by the Application Server.
-
-
Field Summary
-
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit(Xid xid, boolean flags)voidend(Xid xid, int flags)voidforget(Xid xid)intgetTransactionTimeout()voidinternalCommit(org.datanucleus.api.jdo.JDOPersistenceManager pm)Method to commit the TransactionvoidinternalRollback(org.datanucleus.api.jdo.JDOPersistenceManager pm)Method to rollback the TransactionvoidinternalStart(org.datanucleus.api.jdo.JDOPersistenceManager pm)Method to start the TransactionbooleanisSameRM(XAResource xares)intprepare(Xid xid)Xid[]recover(int flags)voidrollback(Xid xid)booleansetTransactionTimeout(int seconds)voidstart(Xid xid, int flags)
-
-
-
Method Detail
-
commit
public void commit(Xid xid, boolean flags) throws XAException
- Specified by:
commitin interfaceXAResource- Throws:
XAException
-
internalCommit
public void internalCommit(org.datanucleus.api.jdo.JDOPersistenceManager pm)
Method to commit the Transaction- Parameters:
pm- PersistenceManager
-
end
public void end(Xid xid, int flags) throws XAException
- Specified by:
endin interfaceXAResource- Throws:
XAException
-
forget
public void forget(Xid xid) throws XAException
- Specified by:
forgetin interfaceXAResource- Throws:
XAException
-
getTransactionTimeout
public int getTransactionTimeout() throws XAException- Specified by:
getTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
isSameRM
public boolean isSameRM(XAResource xares) throws XAException
- Specified by:
isSameRMin interfaceXAResource- Throws:
XAException
-
prepare
public int prepare(Xid xid) throws XAException
- Specified by:
preparein interfaceXAResource- Throws:
XAException
-
recover
public Xid[] recover(int flags) throws XAException
- Specified by:
recoverin interfaceXAResource- Throws:
XAException
-
rollback
public void rollback(Xid xid) throws XAException
- Specified by:
rollbackin interfaceXAResource- Throws:
XAException
-
internalRollback
public void internalRollback(org.datanucleus.api.jdo.JDOPersistenceManager pm)
Method to rollback the Transaction- Parameters:
pm- PersistenceManager
-
setTransactionTimeout
public boolean setTransactionTimeout(int seconds) throws XAException- Specified by:
setTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
start
public void start(Xid xid, int flags) throws XAException
- Specified by:
startin interfaceXAResource- Throws:
XAException
-
internalStart
public void internalStart(org.datanucleus.api.jdo.JDOPersistenceManager pm)
Method to start the Transaction- Parameters:
pm- PersistenceManager
-
-