2.4.4 Step 4: The CORBA Client Application Obtains a Reference to the CORBA Object Needed to Execute Its Business Logic

The CORBA client application needs to perform the following steps:

  1. Obtain a reference to the factory for the object it requires.

    For example, the client application needs a reference to the SimpleFactory object. The client application obtains this factory reference from the FactoryFinder object, shown in the following figure.

  2. Invoke the SimpleFactory object to get a reference to the Simple object.

    If the SimpleFactory object is not active, the TP Framework instantiates the SimpleFactory object by invoking the Server::create_servant method on the Server object, shown in the following figure.

    Figure 2-7 CORBA Server Application

    Describes the CORBA Server Application diagram.
  3. The TP Framework invokes the activate_object() and find_simple() operations on the SimpleFactory object to get a reference to the Simple object, shown in the following figure.

    Figure 2-8 Operations on the SimpleFactory object

    Describes the operations on the SimpleFactory object diagram.

The SimpleFactory object then returns the object reference to the Simple object to the client application.

Note:

Because the TP Framework activates objects by default, the Simpapp sample application does not explicitly use the activate_object() operation for the SimpleFactory object.