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:
- 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.
- 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
- The TP Framework invokes the
activate_object()
andfind_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
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 theactivate_object()
operation for the SimpleFactory object.