This topic describes the CORBA server programming model, which describes the interfaces and processes used to develop CORBA server objects that make up the business logic and business data inherent in a server application. Application programmers use the server programming model if they are developing CORBA server implementation objects, known as servant objects, that perform business functions used in the implementation of client objects.
The concepts about the server programming model are derived from the following general procedure for developing a CORBA server. For task information about developing a CORBA server, see "Developing a CORBA C++ server". Examples of server programming are given in the WSLoggerServer sample, accessible from the Samples Gallery, which is installed with WebSphere Application Server.
In an Interface Definition Language (IDL)file, you define the public interface to the methods provided by the business logic. This defines the information that a client must know to call and use a servant object. For more information about the IDL definition of an implementation, see "Interface Definition Language (IDL)".
Compiling the servant IDL file produces the usage binding files to implement and use the servant object within a particular programming language. For example, this creates an implementation template that provides a native, server language class template into which method behavior can be inserted. WebSphere supports CORBA servers implemented in C++.
The implementation class interface header (servant.ih) created by idlc contains a skeleton class definition, but lacks declarations for class variables, constructors, and destructors. You need to add the missing declarations.
Create the server code to define the methods that the server implements. In particular, create the main() function, which controls the server run time by performing the following tasks:
Like any other programming model, you need to build the modules that the server host can use to run the server and the servant.
Each server needs a unique logical definition in the implementation repository of the host on which the server runs. The logical definition defines the server alias that is used to control the server.