1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
Quoter example
-------------
Context: The Quoter example serves several tests, the first is the test
of several multithreading policies and the second is showing the
use of the Life Cycle Service as it is defined in the
CORBA Common Object Services specification.
Life Cycle Service use-case:
several processes exist: server,
Factory_Finder,
Generic_Factory,
Life_Cycle_Service
client
several object exist: Quoter,
Quoter_Factory,
Quoter_Factory_Finder,
Quoter_Generic_Factory,
Quoter_Life_Cycle_Service
server: The server process contains two kind of objects: Quoter and
Quoter_Factory's. A Quoter is a very simple Object supporting
only one method. The focus is not on a sophisticated object
but on showing how policies work.
The object Quoter_Factory serves as a factory for Quoters.
Factory_Finder: The COS spec. introduces the concept of a Factory Finder
which is capable to find proper factories. The Naming
Service is used as lookup-mechanism. A reference to
the Factory_Finder is passed as parameter of any copy
or move request.
Generic_Factory: This process supports the object Quoter_Generic_Factory (QGF).
The QGF supports the GenericFactory interface introduced by
the COS specification. It forwards create_object requests to
more concrete factories, e.g. the Quoter_Factory. The
concrete factories are found via the Naming Service.
Life_Cycle_Service: This process is very similar to the Generic_Factory
proocess. It also supports an Object, which conforms to
the GenericFactory interface. The Quoter_Life_Cycle_Service
conforms to the idea of a life cycle service as it is
introduced by the COS specification. The Quoter_Life_Cycle_Service
is neutral against the Quoter example. It is not dependent
on it. Only interfaces defined by the CosLifeCycle.idl file
are used. The implemenation uses the COS Trading Service
manage registered Generic Factories, as the Quoter_Generic_Factory
for example. A lookup on the Trading Service is performed
when a create_object request is invoked on it.
client: Creates one Quoter through using the Quoter_Factory_Finder. After that
the copy method of Quoter is invoked to copy the Quoter to an other
location, which is in this example the same location, but that does
not matter so much. The concept is important in this example.
The objects are invoked in the following order:
client->Quoter->Quoter_Factory_Finder->Quoter_Life_Cycle_Service
->Quoter_Generic_Factory->Quoter_Factory
!!!!Note:
To make use of the move operation you need to use the -sm switch on
the perl script. This activates in the server multiple objects, which is needed for
moving.
|