Terminator::commit

Overview Requests that the transaction be committed.
Original interface CosTransactions::Terminator Interface
Exceptions HeuristicHazard
HeuristicMixed
TransactionRolledBack standard exception


Intended Usage

If the transaction has not been marked as rollback-only, and all the participants in the transaction agree to commit, the transaction is committed, and the operation terminates normally. Otherwise, the transaction is rolled back and the standard TransactionRolledBack exception is raised.

If the report_heuristics parameter is true, the transaction framework reports inconsistent or possibly-inconsistent outcomes using the HeuristicMixed or HeuristicHazard exceptions.

The commit operation can rollback the transaction if there are existing or potential activities associated with the transaction that have not completed.

When a top-level transaction is committed, all changes to transactional objects made in the scope of this transaction are made permanent and visible to other transactions or clients.

Note that the suspend operation of the CosTransactions::Current Interface must be used to suspend an active transaction before the commit operation of the Terminator interface is used to commit the transaction.

Syntax

  void commit(in boolean report_heuristics)
      raises(HeuristicMixed, HeuristicHazard); 

Input parameters

report_heuristics
Flag indicating whether heuristic reporting is required.

Return values

None.

Examples

The following examples demonstrate the usage of CosTransactions::Terminator::commit.

C++ Example

  {
     try
     {
       CosTransactions::Control_var control;
       CosTransactions::Terminator_var term;
 
       .....
 
       control = current->suspend();
       term = control->get_terminator();
       term->commit(TRUE);
     }
     catch ( .........
  }

Related reference
CosTransactions in the transaction service



Searchable topic ID:   rcor_ctste1
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_ctste1.html

Library | Support | Terms of Use | Feedback