public class SubCoordinator extends javax.rmi.PortableRemoteObject implements Resource
VOTE_COMMIT, VOTE_READONLY, VOTE_ROLLBACK
Modifier and Type | Method and Description |
---|---|
void |
addJavaxXid(javax.transaction.xa.Xid javaxxid)
add this javaxxid to the List
|
boolean |
addResource(javax.transaction.xa.XAResource xares)
add a XAResource to the list
|
void |
addSynchronization(javax.transaction.Synchronization synchro)
add a Synchronization to the list
|
void |
commit_one_phase()
commit 1 phase.
|
void |
commit()
phase 2 of the 2PC.
|
void |
forget()
forget heuristics about this transaction.
|
javax.transaction.xa.Xid |
getJavaxXid(int xaresindex)
Get the javaxxid at specified index in the list
|
int |
getStatus()
return the status of this transaction
|
int |
getXaresIndex(javax.transaction.xa.XAResource xares)
return index in resourceList of this XAResource
|
int |
prepare()
phase 1 of the 2PC.
|
void |
rollback()
rollback transaction
|
void |
setRollbackOnly()
set the transaction "rollback only"
|
public int prepare() throws java.rmi.RemoteException
public void rollback() throws java.rmi.RemoteException
public void commit() throws java.rmi.RemoteException
public void commit_one_phase() throws java.rmi.RemoteException
commit_one_phase
in interface Resource
java.rmi.RemoteException
public void forget() throws java.rmi.RemoteException
public void addSynchronization(javax.transaction.Synchronization synchro) throws javax.transaction.RollbackException, java.lang.IllegalStateException
synchro
- The javax.transaction.Synchronization object for the
transaction associated with the target objectjavax.transaction.RollbackException
- Thrown to indicate that
the transaction has been marked for rollback only.java.lang.IllegalStateException
- Thrown if the transaction in the
target object is in prepared state or the transaction is inactive.public boolean addResource(javax.transaction.xa.XAResource xares) throws java.lang.IllegalStateException
xares
- XAResource to registerjava.lang.IllegalStateException
- Thrown if the transaction in the
target object is in prepared state or the transaction is inactive.public void addJavaxXid(javax.transaction.xa.Xid javaxxid)
javaxxid
- public javax.transaction.xa.Xid getJavaxXid(int xaresindex)
xaresindex
- public int getStatus()
public void setRollbackOnly()
public int getXaresIndex(javax.transaction.xa.XAResource xares)
xares
- the XAResource