org.exolab.castor.persist
Class XAResourceImpl
java.lang.Object
org.exolab.castor.persist.XAResourceImpl
- All Implemented Interfaces:
- XAResource
public final class XAResourceImpl
- extends Object
- implements XAResource
An XAResource implementation for an XAResourceSource.
Provides the XA interface for starting transactions, participating
in two phase commit and suspending/resuming transactions against
the XA source. Transactions are shared across all XA sources that
map to the same cache engine.
- Version:
- $Revision: 8141 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Assaf Arkin
- See Also:
TransactionContext,
XAResourceSource
| Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XAResourceImpl
public XAResourceImpl(LockEngine engine,
XAResourceSource xaSource)
start
public void start(Xid xid,
int flags)
throws XAException
- Specified by:
start in interface XAResource
- Throws:
XAException
end
public void end(Xid xid,
int flags)
throws XAException
- Specified by:
end in interface XAResource
- Throws:
XAException
forget
public void forget(Xid xid)
throws XAException
- Specified by:
forget in interface XAResource
- Throws:
XAException
prepare
public int prepare(Xid xid)
throws XAException
- Specified by:
prepare in interface XAResource
- Throws:
XAException
commit
public void commit(Xid xid,
boolean onePhase)
throws XAException
- Specified by:
commit in interface XAResource
- Throws:
XAException
rollback
public void rollback(Xid xid)
throws XAException
- Specified by:
rollback in interface XAResource
- Throws:
XAException
recover
public Xid[] recover(int flags)
throws XAException
- Specified by:
recover in interface XAResource
- Throws:
XAException
isSameRM
public boolean isSameRM(XAResource xaRes)
throws XAException
- Specified by:
isSameRM in interface XAResource
- Throws:
XAException
setTransactionTimeout
public boolean setTransactionTimeout(int timeout)
- Specified by:
setTransactionTimeout in interface XAResource
getTransactionTimeout
public int getTransactionTimeout()
- Specified by:
getTransactionTimeout in interface XAResource
Copyright © 2010. All Rights Reserved.