Accessing the CORBA Interface Repository

Why and when to perform this task

CORBA C++ clients and servers can access the Interface Repository (IR) through a well-defined API. A program can call the get_interface() method on any object to obtain its interface definition from the IR or get access to the IR by calling resolve_initial_references("InterfaceRepository").

To enable remote access, a C++ application server must be running on the computer where the IR resides. Any C++ application server automatically is able to serve the contents of the IR. If a C++ application server is not available, you can run the C++ IRServer program, wasirsvr.

If a C++ program is run on the same computer where the IR resides, the IR is accessed by the program directly. Otherwise, the IR is accessed remotely using typical CORBA client-server communication.

You can use either of the following APIs to access the IR, regardless of whether the program is running remotely or locally with respect to the IR:

get_interface() method
The client can access the specific IR information for an application object by calling the get_interface() method on the application CORBA object.
resolve_initial_references( "InterfaceRepository" ) method
In general, you can obtain the root object of the IR by calling the resolve_initial_references("InterfaceRepository") method. However, if the IR is remote from the client and the resolve_initial_references() method is used, you must configure both the program using the IR and the server to use the same port. To do this, complete the following steps:
  1. Configure the server to listen on a specific port. For example, to start the IR server, wasirsvr, tell it to listen to port 727 by entering the following command:
    wasirsvr -Dcom.ibm.CORBA.serverListenPort=727
  2. Configure your program to look for the InterfaceRepository service on the server's host and port. Specify the -ORBInitRef option and a corbaloc URL when you start the program. These arguments are passed to ORB_init within the program. For example, if the server is running on "host1", you could run the client utility, irdump, using the following command:
    irdump.exe -ORBInitRef InterfaceRepository=corbaloc::host1:727/InterfaceRepository

    For more information on the wasirsvr command, see wasirsvr command.

    For information on how to stop a server that is running, see WSStopServer command.

    For more information on the irdump utility, see irdump utility.


Related tasks
Managing the CORBA Interface Repository
Related reference
wasirsvr command
WSStopServer command
irdump utility



Searchable topic ID:   tcor_accessir
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_accessir.html

Library | Support | Terms of Use | Feedback