3.7.1.2.5 Description
The create_servant
method is invoked by the TP
Framework when a request arrives at the server and there is no
available servant to satisfy the request. The TP Framework calls
the create_servant
method with the interface name for
the servant to be created. The server application instantiates an
appropriate C++ object and returns a pointer to it. Typically, the
method contains a switch statement on the interface name and
creates a new object, depending on the interface name.
Caution:
The server application must not depend on this method being invoked for every activation of a CORBA object. The server application must not do any handling of CORBA object state in the constructors or destructors of any servant classes for CORBA objects. This is because the TP Framework may possibly reuse servants on activation and may possibly not destroy servants on deactivation.Parent topic: Server::create_servant()