| java.lang.Object org.objectweb.jotm.XATerminatorImpl
XATerminatorImpl | public class XATerminatorImpl implements XATerminator(Code) | | Implementation of the object that represents an inflow transaction.
|
Method Summary | |
public void | commit(Xid xid, boolean onePhase) Commits the global transaction specified by xid.
Parameters: xid - A global transaction identifier Parameters: onePhase - If true, the resource manager should use one-phase commit protocolto commit the work done on behalf of xid. exception: XAException - An error has occurred. | public void | forget(Xid xid) Tells the resource manager to forget about a heuristically completed transaction branch.
Parameters: xid - A global transaction identifier. exception: XAException - An error has occurred. | public String | get_transaction_name() Gets a String that represents the inflow transaction name. | public int | prepare(Xid xid) Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
Parameters: xid - A global transaction identifier. exception: XAException - An error has occurred. | public Xid[] | recover(int flag) Obtains a list of prepared transaction branches from a resource manager. | public void | rollback(Xid xid) Informs the resource manager to roll back work done on behalf of a transaction branch.
Parameters: xid - A global transaction identifier. exception: XAException - An error has occurred. |
XATerminatorImpl | public XATerminatorImpl() throws XAException(Code) | | Constructor for create
|
commit | public void commit(Xid xid, boolean onePhase) throws XAException(Code) | | Commits the global transaction specified by xid.
Parameters: xid - A global transaction identifier Parameters: onePhase - If true, the resource manager should use one-phase commit protocolto commit the work done on behalf of xid. exception: XAException - An error has occurred. Possible XAExceptionsare XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.If the resouce manager did not commit the transaction and the parameter onePhase is set totrue, the resource manager may throw one of the XA_RB* exceptions. Upon return, theresource manager has rolled back the branch's work and has released all help resources. |
forget | public void forget(Xid xid) throws XAException(Code) | | Tells the resource manager to forget about a heuristically completed transaction branch.
Parameters: xid - A global transaction identifier. exception: XAException - An error has occurred. Possible XAExceptionsare XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO. |
get_transaction_name | public String get_transaction_name() throws XAException(Code) | | Gets a String that represents the inflow transaction name.
Transaction Name |
prepare | public int prepare(Xid xid) throws XAException(Code) | | Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
Parameters: xid - A global transaction identifier. exception: XAException - An error has occurred. Possible XAExceptionsare XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO. A value indicating the resource manager's vote on the outcome of the transaction. Thepossible values are: XA_RDONLY or XA_OK. These constants are defined injavax.transaction.xa.XAResource interface. If the resource manager wants to roll backthe transaction, it should do so by raising an appropriate XAException in the preparemethod. |
recover | public Xid[] recover(int flag) throws XAException(Code) | | Obtains a list of prepared transaction branches from a resource manager. The transaction manager
calls this method during recovery to obtain the list of transaction branches that are currently in
prepared or heuristically completed states.
Parameters: flag - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMHOFLAGS mustbe used when no other flags are set in the parameter. These constants are defined injavax.transaction.xa.XAResource interface. exception: XAException - An error has occurred. Possible valuesare XAER_RMERR, XAER_RMFAIL, XAER_INVAL, or XAER_PROTO. The resource manager returns zero or more XIDs of the transaction branches that arecurrently in a prepared or heuristically completed state. If an error occurs during theoperation, the resource manager should throw the appropriate XAException. |
rollback | public void rollback(Xid xid) throws XAException(Code) | | Informs the resource manager to roll back work done on behalf of a transaction branch.
Parameters: xid - A global transaction identifier. exception: XAException - An error has occurred. Possible XAExceptionsare XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.If the transaction branch is already marked rollback-only the resource manager may throwone of the XA_RB* exceptions. Upon return, the resource manager has rolled back thebranch's work and has released all held resources. |
|
|