org.openorb.ots.jta
Class XACoordinator

java.lang.Object
  extended byorg.omg.PortableServer.Servant
      extended byorg.omg.CosTransactions.ResourcePOA
          extended byorg.openorb.ots.jta.XACoordinator
All Implemented Interfaces:
org.omg.CORBA.portable.InvokeHandler, ResourceOperations

public class XACoordinator
extends ResourcePOA

This class is a coordinator that manages XA Resources.

Author:
Jerome Daniel

Constructor Summary
XACoordinator(org.omg.PortableServer.POA poa, otid_t ots_xid, Logger logger)
          Constructor
 
Method Summary
 void commit_one_phase()
          Commit one phase
 void commit()
          Commit a transaction ( 2nd phase of 2PC )
 void endXAResource(javax.transaction.xa.XAResource resource, boolean success)
          End the usage of an XA resource
 void forget()
          Forget a transaction
 Vote prepare()
          First phase of the 2PC
 void registerXAResource(javax.transaction.xa.XAResource resource)
          Add an XA resource.
 void rollback_after_prepare()
          This operation is used to rollback all prepared XA resources.
 void rollback()
          Rollback the transaction ( 2nd phase of 2PC )
 
Methods inherited from class org.omg.CosTransactions.ResourcePOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XACoordinator

public XACoordinator(org.omg.PortableServer.POA poa,
                     otid_t ots_xid,
                     Logger logger)
Constructor

Method Detail

prepare

public Vote prepare()
             throws HeuristicMixed,
                    HeuristicHazard
First phase of the 2PC

Throws:
HeuristicMixed
HeuristicHazard

rollback

public void rollback()
              throws HeuristicCommit,
                     HeuristicMixed,
                     HeuristicHazard
Rollback the transaction ( 2nd phase of 2PC )

Throws:
HeuristicCommit
HeuristicMixed
HeuristicHazard

commit

public void commit()
            throws NotPrepared,
                   HeuristicRollback,
                   HeuristicMixed,
                   HeuristicHazard
Commit a transaction ( 2nd phase of 2PC )

Throws:
NotPrepared
HeuristicRollback
HeuristicMixed
HeuristicHazard

commit_one_phase

public void commit_one_phase()
                      throws HeuristicHazard
Commit one phase

Throws:
HeuristicHazard

forget

public void forget()
Forget a transaction


rollback_after_prepare

public void rollback_after_prepare()
                            throws HeuristicCommit,
                                   HeuristicMixed,
                                   HeuristicHazard
This operation is used to rollback all prepared XA resources.

Throws:
HeuristicCommit
HeuristicMixed
HeuristicHazard

registerXAResource

public void registerXAResource(javax.transaction.xa.XAResource resource)
Add an XA resource.


endXAResource

public void endXAResource(javax.transaction.xa.XAResource resource,
                          boolean success)
End the usage of an XA resource