org.openejb.corba.services.transaction
Class XACoordinator
java.lang.Object
|
+--org.omg.PortableServer.Servant
|
+--org.omg.CosTransactions.ResourcePOA
|
+--org.openejb.corba.services.transaction.XACoordinator
- All Implemented Interfaces:
- org.omg.CORBA.portable.InvokeHandler, org.omg.CosTransactions.ResourceOperations
- public class XACoordinator
- extends org.omg.CosTransactions.ResourcePOA
This class is a coordinator that manages XA Resources.
- Version:
- 1.0
- Author:
- Jerome DANIEL
Constructor Summary |
XACoordinator(org.omg.PortableServer.POA poa,
org.omg.CosTransactions.otid_t ots_xid)
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 |
org.omg.CosTransactions.Vote |
prepare()
--------
//
// Resource interface implementation
//
/**--------
/**
First phase of the 2PC |
void |
registerXAResource(javax.transaction.xa.XAResource resource)
Add an XA resource. |
void |
rollback_after_prepare()
--------
//
// Implementation specific operations
//
/**--------
/**
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, _get_interface, _is_a, _non_existent, _object_id, _orb, _orb, _poa, _set_delegate, _this_object, _this_object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XACoordinator
public XACoordinator(org.omg.PortableServer.POA poa,
org.omg.CosTransactions.otid_t ots_xid)
- Constructor
prepare
public org.omg.CosTransactions.Vote prepare()
throws org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
- --------
//
// Resource interface implementation
//
/**--------
/**
First phase of the 2PC
- Overrides:
prepare
in class org.omg.CosTransactions.ResourcePOA
rollback
public void rollback()
throws org.omg.CosTransactions.HeuristicCommit,
org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
- Rollback the transaction ( 2nd phase of 2PC )
- Overrides:
rollback
in class org.omg.CosTransactions.ResourcePOA
commit
public void commit()
throws org.omg.CosTransactions.NotPrepared,
org.omg.CosTransactions.HeuristicRollback,
org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
- Commit a transaction ( 2nd phase of 2PC )
- Overrides:
commit
in class org.omg.CosTransactions.ResourcePOA
commit_one_phase
public void commit_one_phase()
throws org.omg.CosTransactions.HeuristicHazard
- Commit one phase
- Overrides:
commit_one_phase
in class org.omg.CosTransactions.ResourcePOA
forget
public void forget()
- Forget a transaction
- Overrides:
forget
in class org.omg.CosTransactions.ResourcePOA
rollback_after_prepare
public void rollback_after_prepare()
throws org.omg.CosTransactions.HeuristicCommit,
org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
- --------
//
// Implementation specific operations
//
/**--------
/**
This operation is used to rollback all prepared XA resources.
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