![]() |
CORBA servers can be written for ORBs other than the ORB provided with WebSphere Application Server. These servers follow the same general structure as a server written for the WebSphere ORB, but differences between ORBs mean differences in the details. Writing a server for a specific third-party ORB requires familiarity with the ORB; such a server is not a WebSphere-based application at all.
In general, a minimal CORBA server comprises the following code:
The methods used to initialize the ORB and to put the server into the listening state are usually standard CORBA methods, but there can be variations across ORBs and across versions of the same ORB. The mechanisms used by clients to locate servers and implementation objects vary with the design of the application and with the naming facilities supported in an environment. Two common choices are to have the server register naming contexts for itself and its servant objects in a CORBA name service, from which the client can retrieve them, and to have the server register its naming contexts and write them to files as interoperable object references (IORs), which the client retrieves and uses to re-create the naming contexts.
After the server is written, it must be compiled and run. The steps involved in compiling and running a server written for a third-party ORB depend heavily on the requirements of the ORB, the platform on which the server runs, the language in which the server is written, and the design of the application.