[Enterprise Extensions only]

Coordinator::is_ancestor_transaction

Overview Determines whether the transaction associated with the target object is an ancestor of the transaction associated with the parameter object.
Original interface CosTransactions::Coordinator Interface


Intended Usage

A transaction is an ancestor of another transaction if, and only if, the transactions are the same, or the first is an ancestor of the parent of the second.

IDL Syntax

  boolean is_ancestor_transaction(in Coordinator tc);

Input parameters

tc
A pointer to the Coordinator object for a transaction.

Return values

TRUE
The transaction associated with the target object is an ancestor of the transaction associated with the parameter object.
FALSE
The transaction associated with the target object is not an ancestor of the transaction associated with the parameter object.

Examples

The following examples demonstrate the usage of CosTransactions::Coordinator::is_ancestor_transaction.

C++ Example

  CosTransactions::Coordinator *c1, *c2;
  if( c1->is_ancestor_transaction(c2) )
  {
      cout << "c1 is an ancestor of c2" << endl;
  }
  else
  {
      cout << "c1 is not an ancestor of c2" << endl;
  }
 

Java Example

  org.omg.CosTransactions.Coordinator c1, c2;
  if( c1.is_ancestor_transaction(c2) )
  {
      System.out.println ("c1 is an ancestor of c2");
  }
  else
  {
      System.out.println ("c1 is not an ancestor of c2");
  }