ORB::get_default_context

Overview Returns the default CORBA::Context object.
Original class CORBA::ORB
Exceptions CORBA::SystemException


Intended Usage

This method is used by client applications to obtain a default CORBA::Context object, which can be passed to IDL operations that require a Context parameter. The default CORBA::Context object contains a name/value pair for each environment variable set in the calling process's environment.

Syntax

  CORBA::Status get_default_context (CORBA::Context_ptr& ctx);

Input parameters

ctx
A pointer for a CORBA::Context object, passed by reference, to be initialized by the CORBA::ORB::get_default_context method. The caller assumes ownership of the CORBA::Context object.

Return values

CORBA::Status
A zero return value indicates success.

Example

  /* The following program creates a CORBA::Context object and generates
     system exception if appropriate
   */
  #include "corba.h"
  #include   int main(int argc, char* argv[])
  {
    int rc = 0;
    CORBA::Context_ptr Ctxtptr = CORBA::Context::_nil();
    /* assume orb initialized */
    extern CORBA::ORB_ptr orb;
 
    try
    {
      CORBA::Status st = orb->get_default_context( Ctxtptr);
    }
    catch (CORBA::SystemException &se)
    {
      cout << "exception: " << se.id() << endl; rc="1;"
    }
    return rc;
  }

Related reference
CORBA module



Searchable topic ID:   rcor_modo23
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_modo23.html

Library | Support | Terms of Use | Feedback