![]() |
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. The steps link to more detailed concepts. For task information about developing a CORBA server, see Developing a CORBA server.
Examples of server programming are given in the WSLoggerServer sample,
for which files are included with WebSphere in the following directory:
WAS_HOME/Enterprise/samples/sampcppsdk
.
In an IDL (interface definition language) 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), usage and implementation.
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.
The implementation class (servant_I.cpp) created by idlc contains a skeleton implementation definition, which you need to complete by adding the business logic that the servant is to provide.
Each server needs a unique logical definition in the implementation repository of the host on which the server is to run. The logical definition defines the server alias that is used to control the server.
Related tasks... | |
Creating IDL files for an Enterprise JavaBean | |
Related concepts... | |
Parent: The CORBA programming model | |
The CORBA client programming model | |
Interface Definition Language (IDL) | |