Current::resume

Overview Associates the current thread with the supplied transaction context (in place on any previously associated transaction context).
Original interface CosTransactions::Current Interface
Exceptions InvalidControl
INITIALIZE standard exception


Intended Usage

If the parameter is not valid in the current execution context (that is, it is an object reference with an invalid value), the current thread is associated with no transaction.

The INITIALIZE standard exception is raised if resume is being used for the first time and the Transaction Service cannot be initialized.

Syntax

  void resume(in Control which)
      raises(InvalidControl); 

Input parameters

which
The Control object representing the transaction context.

Return values

None.

Examples

The following example demonstrates the usage of CosTransactions::Current::resume.

C++ Example

  #include <CosTransactions.hh> // CosTransactions module
  ...
  CosTransactions::Control_ptr control = control_parameter;
  ...
  //Access the CosTransactions::Current object.
  CORBA::Object_ptr orbCurrentPtr = 
     CBSeriesGlobal::orb()->resolve_initial_references("TransactionCurrent");
  CosTransactions::Current_ptr current = 
     CosTransactions::Current::_narrow(orbCurrentPtr);
  ...
  // Resume the association between the transaction and the thread.
  try
  {
      current->resume(control);
  }
  catch(CosTransactions::InvalidControl)
  {
      cout << "Error: control object passed to resume was invalid" << endl;
  }
 

Related reference
CosTransactions in the transaction service



Searchable topic ID:   rcor_ctscu6
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_ctscu6.html

Library | Support | Terms of Use | Feedback