Initializing the client environment

Why and when to perform this task

Use this task to add code that initializes the Object Request Broker (ORB) for use by the client program.

To do this, edit the client source file, client.cpp, and add the following code to the main() function:

int main ( int argc, char *argv[] )
{
   CORBA::ORB_ptr orbPtr = CORBA::ORB_init ( argc, argv, "DSOM" );
   if ( CORBA::is_nil(orbPtr) )
   {
      cerr << "Error initializing the ORB!" << endl;
      return 1;
   }

   .
   .
   .

}

Results

This task adds code to initialize the client environment for a CORBA client.

What to do next

You need to add code to the client source file to enable the client to access naming contexts as described in Adding code to access naming contexts.

Related concepts
Client environment initialization of the C++ ORB
Related tasks
Creating the CORBA client main code (client.cpp)



Searchable topic ID:   tcor_pgmc1c
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/tasks/tcor_pgmc1c.html

Library | Support | Terms of Use | Feedback