org.objectweb.jotm
Class SubCoordinator
PortableRemoteObject
org.objectweb.jotm.SubCoordinator
- Remote, Resource
public class SubCoordinator
extends PortableRemoteObject
This object is the local coordinator. It may be registered as
sub-coordinator in case of distributed transaction, so it must
be callable remotely and implement Resource
addJavaXid
public void addJavaXid(Xid javaxxid)
addResource
public boolean addResource(XAResource xares)
throws IllegalStateException
add a XAResource to the list
xares
- XAResource to register
- true if this datasource was already known
addSynchronization
public void addSynchronization(Synchronization synchro)
throws RollbackException,
IllegalStateException
add a Synchronization to the list
synchro
- The javax.transaction.Synchronization object for the
transaction associated with the target object
commit
public void commit()
throws RemoteException
phase 2 of the 2PC.
- commit in interface Resource
commit_one_phase
public void commit_one_phase()
throws RemoteException
commit 1 phase. Called either from JTM (distributed transaction) or
from Transaction.commit (local transaction).
- commit_one_phase in interface Resource
forget
public void forget()
throws RemoteException
forget heuristics about this transaction.
- forget in interface Resource
getJavaxXid
public Xid getJavaxXid(int xaresindex)
getStatus
public int getStatus()
return the status of this transaction
getXaresIndex
public int getXaresIndex(XAResource xares)
prepare
public int prepare()
throws RemoteException
phase 1 of the 2PC.
- prepare in interface Resource
- int vote commit, rollback, or readonly.
rollback
public void rollback()
throws RemoteException
rollback transaction
- rollback in interface Resource
setRollbackOnly
public void setRollbackOnly()
set the transaction "rollback only"