3.7 TP Framework API

This section describes the TP Framework API. Additional information about how to use this API can be found in Creating CORBA Server Applications.

The TP Framework comprises the following components:

  • The Server C++ class, which has virtual methods for application-specific server initialization and termination logic
  • The ServerBase C++ class, which has virtual methods for multithreaded server applications.
  • The Tobj_ServantBase C++ class, which has virtual methods for object state management
  • The TP C++ class, which provides methods to:
    • Create object references for CORBA objects
    • Register (and unregister) factories with the FactoryFinder object
    • Initiate user-controlled preactivation and deactivation of objects
    • Initiate user-controlled deactivation of the CORBA object currently being invoked
    • Obtain an object reference to the CORBA object currently being invoked
    • Open and close XA resource managers
    • Log messages to a user log (ULOG) file
    • Obtain object references to the ORB and to Bootstrap objects (if not using the CORBA Interoperable Naming Service (INS))
  • Header files for these classes
  • Libraries that are used by server applications

    The visible part of the TP Framework consists of two categories of operations:

  • Service methods that can be called by user code. These are in the TP interface.
  • Callback methods that are written by the user and that are invoked by the TP Framework. This includes methods in the Tobj_ServantBase and Server classes. These operations are intended to be called by TP Framework code only. The application code should never call the methods of these classes. If it does, unpredictable results may occur.