1
// README,v 1.1 2003/12/17 00:30:50 lut Exp
3
This example showcases a component implementation in its simplest
4
form. The utmost purpose of this example is to demonstrate how easy
5
it is to implement a component and a system using CCM and to provide
6
ourselves an example implementation of how the CCIDL generated code
9
To implement a component, all you need to do is to define the
10
component, as in hello.idl. Then you have to define some aspects of
11
the component implementations using the CIDL definition, as we do here
12
with hello.cidl. And finally, the component implementor implement the
13
component and home executors according to the executor mapping.
18
--------- ---------------------------------------
19
hello.idl Component and Home IDL definitions.
21
hello.cidl Component and Home implementation definitions.
23
hello_exec Executor implementations.
26
We also generate 3 libraries and 2 executables in this example. They
27
may look perplexing at the first glance, but when we have full CCM
28
support, all but one library and one executable will need to be
29
generated manually. The rest should be generated thru the tools provided by CIAO.
30
Below is the list of libraries and executable in this example:
33
--------- ---------------------------------------
34
hello_stub A library contains the client stub implementation.
35
Client programs can link to this library instead of including
36
the stub implementation directly in the executable. The real
37
purpose of putting the stub code in a separate library is
38
to avoid code duplication when various interdependent components
39
are installed into one component server (where they will need to
40
interact with other components using the collocation code in the
43
hello_svant This library contains the server side skeletons and CIDL generated
44
(currently handcrafted) servant implementation for the component
45
and home defined in CIDL.
47
server This is a minimalist's implementaion of a simple "generic server".
48
We should be able to generalize the example into a "component server"
49
in CIAO which will support component deployment and server configuration
50
thru some property files.
52
client A simple client program that access the component.
54
hello_exec This library contains the CIDL generated executor definitions and the
55
actual component and home implementations (business logic.) It it not
56
clear to me whether we should package this file together with hello_servants
57
library as most of the stuff included in these libraries are generated
58
by CIDL compiler. We will see in the future.
61
** Here's a more detailed break down of the process.
63
1. Define the component, as in hello.idl which defines the client-view
64
of the component. This view is equivalent to the interfaces
65
defined in helloC.idl (for component unawared client.)
67
2. Define how the component should be implemented, as in hello.cidl.
68
CIDL compiler should generate the executor definitions as in
71
3. CIDL also generate the component-specific skeleton (container?)
72
implementations as in HelloSkel.xxx. These skeleton
73
implementations determine how the component should be activated,
74
how to manage the servant lifecycle, their OID and such.
76
4. If a component implementation needs to support more advanced
77
features, such as transactional behavior, the developer needs to
78
"extend" the executor definitions by inheriting from other
79
components callback interfaces, such as SessionSynchronization.
80
We don't have an example here because we want to keep this example
81
as simple as possible.
83
5. Component executors are implemention by implementing the desired
86
6. Packaging and deploying the component.... This example only shows
87
how to deploy a single component implementation. The servant
88
skeletons can either be packaged with the component implementation
89
in a single DLL, or be packaged in a separate DLL which, in turn,
90
can be deployed with the component implementation together as an
91
assembly, or be put in some sort of repository.
99
run_test.pl to start the test using CIAO_Daemon and ComponentServer
103
run_simple_test.pl to start the test using Simple_Component_Server
104
Note: I am having trouble with the simple component server.
b'\\ No newline at end of file'