summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorlut <lut@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-17 00:30:50 +0000
committerlut <lut@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-17 00:30:50 +0000
commit39590f8905a72c51876765f23025b8ca18cb0b09 (patch)
tree0084f2009b7c65c824a452a352727e91fe9efa4f /TAO
parent47fa1ede159cc4522e7284b801a034c790f9fa64 (diff)
downloadATCD-39590f8905a72c51876765f23025b8ca18cb0b09.tar.gz
ChangeLogTag: Tue Dec 16 18:25:01 2003 Tao Lu <lu@tango.dre.vanderbilt.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/CIAO/ChangeLog33
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini3
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/README104
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/client.cpp117
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/config1
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello.cidl13
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello.csd75
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello.idl19
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello.mpc80
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello.ssd53
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp52
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello_exec.h54
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h54
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h54
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h54
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/index.html160
-rwxr-xr-xTAO/CIAO/docs/tutorial/Hello/run_simple_test.pl47
-rwxr-xr-xTAO/CIAO/docs/tutorial/Hello/run_test.pl113
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/simple_client.cpp103
19 files changed, 1029 insertions, 160 deletions
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
index 3715e056abf..45bf2b715e2 100644
--- a/TAO/CIAO/ChangeLog
+++ b/TAO/CIAO/ChangeLog
@@ -1,3 +1,26 @@
+Tue Dec 16 18:25:01 2003 Tao Lu <lu@tango.dre.vanderbilt.edu>
+
+ * docs/tutorial/Hello/README:
+ * docs/tutorial/Hello/config:
+ * docs/tutorial/Hello/CIAO_Installation_Data.ini:
+ * docs/tutorial/Hello/hello.idl:
+ * docs/tutorial/Hello/hello.cidl:
+ * docs/tutorial/Hello/hello.mpc:
+ * docs/tutorial/Hello/hello.csd:
+ * docs/tutorial/Hello/hello.ssd:
+ * docs/tutorial/Hello/hello_exec.cpp:
+ * docs/tutorial/Hello/hello_exec.h:
+ * docs/tutorial/Hello/hello_stub_export.h:
+ * docs/tutorial/Hello/hello_svnt_export.h:
+ * docs/tutorial/Hello/hello_exec_export.h:
+ * docs/tutorial/Hello/client.cpp:
+ * docs/tutorial/Hello/simple_client.cpp:
+ * docs/tutorial/Hello/run_test.pl:
+ * docs/tutorial/Hello/run_simple_test.pl:
+
+ Changed Nanbor's handcrafted helloworld example to use the CIDL compiler.
+ Stardard CIAO naming is used (_svnt, _exec etc.).
+
Tue Dec 16 14:14:59 2003 Tao Lu <lu@dre.vanderbilt.edu>
* docs/tutorial/hello/index.html:
@@ -47,6 +70,7 @@ Wed Dec 3 12:25:20 2003 Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
Moved file to the right directory and updated name of the .cad file
to the right one. Thanks to Gautam Thaker for pointing this out.
+
Tue Dec 2 18:40:59 2003 Tao Lu <lu@dre.vanderbilt.edu>
* examples/Hello/Receiver/Receiver_exec.cpp:
@@ -56,6 +80,15 @@ Tue Dec 2 18:40:59 2003 Tao Lu <lu@dre.vanderbilt.edu>
Receiver_exec which caused the OBV run time error when
the Sender and the Receiver are not collocated.
+Tue Dec 2 18:32:23 2003 Tao Lu <lu@tango.dre.vanderbilt.edu>
+
+ * examples/Hello/Receiver/Receiver_exec.cpp:
+ * examples/Hello/descriptors/run_test_default.pl:
+ * examples/Hello/descriptors/run_test_remote.pl:
+ Added two auto run perl scripts and fixed the bug in the
+ Receiver_exec which caused the OBV run time error when
+ the Sender and the Receiver are not collocated.
+
Mon Dec 1 17:49:43 2003 Tao Lu <lu@dre.vanderbilt.edu>
* examples/Hello/descriptors/remote.cad:
diff --git a/TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini b/TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini
new file mode 100644
index 00000000000..30c917fe349
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/CIAO_Installation_Data.ini
@@ -0,0 +1,3 @@
+[ComponentInstallation]
+DCE:05833d92-4783-4b85-ac14-e2575dac26f7=hello_svnt
+DCE:530a6305-8181-47ca-bd82-0b834016db97=hello_exec
diff --git a/TAO/CIAO/docs/tutorial/Hello/README b/TAO/CIAO/docs/tutorial/Hello/README
new file mode 100644
index 00000000000..182f5e5baee
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/README
@@ -0,0 +1,104 @@
+// $Id$
+
+This example showcases a component implementation in its simplest
+form. The utmost purpose of this example is to demonstrate how easy
+it is to implement a component and a system using CCM and to provide
+ourselves an example implementation of how the CCIDL generated code
+should look like.
+
+To implement a component, all you need to do is to define the
+component, as in hello.idl. Then you have to define some aspects of
+the component implementations using the CIDL definition, as we do here
+with hello.cidl. And finally, the component implementor implement the
+component and home executors according to the executor mapping.
+
+
+User Defined Notes
+Files
+--------- ---------------------------------------
+hello.idl Component and Home IDL definitions.
+
+hello.cidl Component and Home implementation definitions.
+
+hello_exec Executor implementations.
+
+
+We also generate 3 libraries and 2 executables in this example. They
+may look perplexing at the first glance, but when we have full CCM
+support, all but one library and one executable will need to be
+generated manually. The rest should be generated thru the tools provided by CIAO.
+Below is the list of libraries and executable in this example:
+
+Files Notes
+--------- ---------------------------------------
+hello_stub A library contains the client stub implementation.
+ Client programs can link to this library instead of including
+ the stub implementation directly in the executable. The real
+ purpose of putting the stub code in a separate library is
+ to avoid code duplication when various interdependent components
+ are installed into one component server (where they will need to
+ interact with other components using the collocation code in the
+ stub library.)
+
+hello_svant This library contains the server side skeletons and CIDL generated
+ (currently handcrafted) servant implementation for the component
+ and home defined in CIDL.
+
+server This is a minimalist's implementaion of a simple "generic server".
+ We should be able to generalize the example into a "component server"
+ in CIAO which will support component deployment and server configuration
+ thru some property files.
+
+client A simple client program that access the component.
+
+hello_exec This library contains the CIDL generated executor definitions and the
+ actual component and home implementations (business logic.) It it not
+ clear to me whether we should package this file together with hello_servants
+ library as most of the stuff included in these libraries are generated
+ by CIDL compiler. We will see in the future.
+
+
+** Here's a more detailed break down of the process.
+
+1. Define the component, as in hello.idl which defines the client-view
+ of the component. This view is equivalent to the interfaces
+ defined in helloC.idl (for component unawared client.)
+
+2. Define how the component should be implemented, as in hello.cidl.
+ CIDL compiler should generate the executor definitions as in
+ helloE.idl.
+
+3. CIDL also generate the component-specific skeleton (container?)
+ implementations as in HelloSkel.xxx. These skeleton
+ implementations determine how the component should be activated,
+ how to manage the servant lifecycle, their OID and such.
+
+4. If a component implementation needs to support more advanced
+ features, such as transactional behavior, the developer needs to
+ "extend" the executor definitions by inheriting from other
+ components callback interfaces, such as SessionSynchronization.
+ We don't have an example here because we want to keep this example
+ as simple as possible.
+
+5. Component executors are implemention by implementing the desired
+ executor definition.
+
+6. Packaging and deploying the component.... This example only shows
+ how to deploy a single component implementation. The servant
+ skeletons can either be packaged with the component implementation
+ in a single DLL, or be packaged in a separate DLL which, in turn,
+ can be deployed with the component implementation together as an
+ assembly, or be put in some sort of repository.
+
+
+How to Run:
+----------
+
+Run with
+
+ run_test.pl to start the test using CIAO_Daemon and ComponentServer
+
+or
+
+ run_simple_test.pl to start the test using Simple_Component_Server
+ Note: I am having trouble with the simple component server. \ No newline at end of file
diff --git a/TAO/CIAO/docs/tutorial/Hello/client.cpp b/TAO/CIAO/docs/tutorial/Hello/client.cpp
new file mode 100644
index 00000000000..df7497cd9b9
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/client.cpp
@@ -0,0 +1,117 @@
+// $Id$
+
+#include "helloC.h"
+#include "ace/Read_Buffer.h"
+#include "ace/streams.h"
+
+int
+invoke (CORBA::Object_ptr obj,
+ const char *msg
+ ACE_ENV_ARG_DECL)
+{
+ // Narrow
+ HelloHome_var hh = HelloHome::_narrow (obj
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1); ;
+
+ if (CORBA::is_nil (hh.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Argument is not a HelloHome reference\n"), -1);
+
+ HelloWorld_var hw = hh->create ();
+
+ if (CORBA::is_nil (hw.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Fail to create a HelloWorld reference\n"), -1);
+
+ CORBA::String_var name = CORBA::string_dup (msg);
+ CORBA::String_var hi = hw->sayhello (name
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_INFO, "%s\n", hi.in ()));
+
+ hh->remove_component (hw.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // Initialize orb
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv ACE_ENV_ARG_PARAMETER);
+
+ // Resolve HomeFinder interface
+
+#if 0
+ CORBA::Object_var obj = orb->resolve_initial_references ("HomeFinder"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Components::HomeFinder_var home_finder =
+ Components::HomeFinder::_narrow (obj ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (home_finder.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Can't resolve initial HomeFinder reference\n"), -1);
+
+ // Now get the HelloHome
+
+ obj = home_finder->find_home_by_name ("HelloHome"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ invoke (obj.in (),
+ "Frodo Baggins using 'find_home_by_name'"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ obj = home_finder->find_home_by_home_type
+ ("IDL:omg.org/HelloHome:1.0"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ invoke (obj.in (),
+ "Samwise Gamgee using 'find_home_by_home_type'"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ obj = home_finder->find_home_by_component_type
+ ("IDL:omg.org/HelloWorld:1.0"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ invoke (obj.in (),
+ "Meriadoc Brandybuck using 'find_home_by_component_type'"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+#else
+ CORBA::Object_var obj
+ = orb->string_to_object ("file://hello.ior" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ invoke (obj.in (),
+ "Meriadoc Brandybuck using 'file://hello.ior'"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+#endif
+
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Who is the culprit \n");
+ cerr << "Uncaught CORBA exception" << endl;
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/CIAO/docs/tutorial/Hello/config b/TAO/CIAO/docs/tutorial/Hello/config
new file mode 100644
index 00000000000..3bfe3d3dbe5
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/config
@@ -0,0 +1 @@
+hello_executors|createHelloHome_Impl|hello_servants|createHelloHome_Servant|IDL:omg.org/HelloHome:1.0|IDL:omg.org/HelloWorld:1.0|HelloHome
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.cidl b/TAO/CIAO/docs/tutorial/Hello/hello.cidl
new file mode 100644
index 00000000000..fa41764521e
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello.cidl
@@ -0,0 +1,13 @@
+// $Id$ -*- IDL -*-
+
+// Component implementation definition of hello.idl.
+#include "hello.idl"
+
+composition session hello_example
+{
+ home executor HelloHome_Exec
+ {
+ implements HelloHome; // This implies that HelloWorld_Exec
+ manages HelloWorld_Exec; // implements HellowWorld.
+ };
+};
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.csd b/TAO/CIAO/docs/tutorial/Hello/hello.csd
new file mode 100644
index 00000000000..ac185744423
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello.csd
@@ -0,0 +1,75 @@
+<?xml version="1.0"?> <!-- -*- SGML -*- -->
+
+<!-- If this file is moved to a different directory, make sure to change the
+ path to the DTD below. Otherwise the examples won't work. -->
+<!DOCTYPE softpkg SYSTEM "../../../docs/XML/softpkg.dtd">
+
+<!-- Hello World's Software Package Descriptor -->
+<!-- This file describes various HelloWorld executor -->
+<!-- implementations. -->
+
+
+<softpkg name="CIAO-HelloWorld" version="1.0">
+ <pkgtype>CORBA Component</pkgtype>
+ <title>Hello World</title>
+ <author>
+ <company>Washington University in St. Louis</company>
+ <webpage href="http://www.cs.wustl.edu/~doc/"/>
+ </author>
+ <description>A Hello World executor implementation.</description>
+ <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/>
+ <idl id="IDL:HelloWorld:1.0" homeid="IDL:HelloHome:1.0">
+ <fileinarchive name="hello.idl"/>
+ </idl>
+
+ <!-- We don't need a property file for this example. However, -->
+ <!-- what to do with this element? Cache it in ComponentInstallation? -->
+ <!-- A better question maybe, when do we actually read the file and -->
+ <!-- build the attributes defined in the file? By Assembly perhaps? -->
+ <!-- Notice that this property file applies to the implementation itself. -->
+ <!-- Whatever that means. -->
+<!-- <propertyfile> -->
+<!-- <fileinarchive name="empty.cpf"/> -->
+<!-- </propertyfile> -->
+
+ <descriptor type="CORBA Component">
+ <fileinarchive name="hello.ccd"/>
+ </descriptor>
+
+ <implementation id="DCE:530a6305-8181-47ca-bd82-0b834016db97">
+ <!-- Perhaps we can list more OS here as ACE knows what to look for? -->
+ <!-- Maybe not... But then selecting the right configuration becomes hard. -->
+ <os name="WinNT" version="4.0"/>
+ <os name="WinXP" version="5.0"/>
+ <processor name="x86"/>
+ <!-- What about configuration? Such as Debug/Release? -->
+ <compile name="MSVC" version="6.0"/>
+ <programminglanguage name="C++"/>
+ <dependency type="ORB">
+ <name>TAO</name>
+ </dependency>
+
+ <!-- CIAO extension -->
+ <dependency type="CIAODLL">
+ <softpkgref>
+ <!-- .ssd stands for Servant Software Descriptors which is a CIAO extension -->
+ <fileinarchive name="hello.ssd"/>
+ <implref idref="DCE:05833d92-4783-4b85-ac14-e2575dac26f7"/>
+ </softpkgref>
+ </dependency>
+
+ <!-- What happens when one define descriptors for both softpkg and -->
+ <!-- implementations? -->
+
+ <code type="DLL">
+ <!-- No need to specify extension below since ACE takes care of that, -->
+ <fileinarchive name="hello_exec"/>
+ <entrypoint>createHelloHome_Impl</entrypoint>
+ </code>
+
+ </implementation>
+
+ <!-- Let's add more implementation description later when we try to -->
+ <!-- compile this stuff on, say, Solaris and Linux. -->
+
+</softpkg>
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.idl b/TAO/CIAO/docs/tutorial/Hello/hello.idl
new file mode 100644
index 00000000000..fe1a29a0370
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello.idl
@@ -0,0 +1,19 @@
+// $Id$
+
+// A plain vanilla component definition.
+
+#include <Components.idl>
+
+interface Hello
+{
+ string sayhello (in string username);
+};
+
+component HelloWorld supports Hello
+{
+};
+
+
+home HelloHome manages HelloWorld
+{
+};
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.mpc b/TAO/CIAO/docs/tutorial/Hello/hello.mpc
new file mode 100644
index 00000000000..0d39f460611
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello.mpc
@@ -0,0 +1,80 @@
+// $Id$
+
+project(hello_stub): ciao_client {
+ sharedname = hello_stub
+ idlflags += -Wb,stub_export_macro=HELLO_STUB_Export -Wb,stub_export_include=hello_stub_export.h -Wb,skel_export_macro=HELLO_SVNT_Export -Wb,skel_export_include=hello_svnt_export.h
+ dynamicflags = HELLO_STUB_BUILD_DLL
+
+ IDL_Files {
+ hello.idl
+ }
+
+ Source_Files {
+ helloC.cpp
+ }
+}
+
+project(hello_svnt) : ciao_servant {
+ after += hello_stub
+ sharedname = hello_svnt
+ libs += hello_stub
+ idlflags += -Wb,export_macro=HELLO_SVNT_Export -Wb,export_include=hello_svnt_export.h
+ dynamicflags = HELLO_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ hello.cidl
+ }
+
+ IDL_Files {
+ helloE.idl
+ }
+
+ Source_Files {
+ helloEC.cpp
+ helloS.cpp
+ hello_svnt.cpp
+ }
+}
+
+project(hello_exec) : ciao_component {
+ after += hello_svnt
+ sharedname = hello_exec
+ libs += hello_stub hello_svnt
+ dynamicflags = HELLO_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ hello_exec.cpp
+ }
+}
+
+project (*client) : ciao_client {
+ exename = client
+ after += hello_stub
+ libs += hello_stub
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
+
+// Client for interacting with the Simple_Component_Server
+project (*simple_client) : ciao_client {
+ libpaths += $(CIAO_ROOT)/tools/Simple_Component_Server
+ after += hello_stub Simple_Server_Stbu
+ libpaths += $(CIAO_ROOT)/tools/Simple_Component_Server
+ libs += hello_stub CIAO_Simple_Server_Stub
+ exename = simple_client
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ simple_client.cpp
+ }
+}
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello.ssd b/TAO/CIAO/docs/tutorial/Hello/hello.ssd
new file mode 100644
index 00000000000..828ca435f5b
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello.ssd
@@ -0,0 +1,53 @@
+<?xml version="1.0"?> <!-- -*- SGML -*- -->
+
+<!-- If this file is moved to a different directory, make sure to change the
+ path to the DTD below. Otherwise the examples won't work. -->
+<!DOCTYPE softpkg SYSTEM "../../../docs/XML/softpkg.dtd">
+
+<!-- Hello World's Servant Software Descriptor -->
+<!-- This file describes various HelloWorld servant -->
+<!-- implementations. -->
+
+
+<softpkg name="CIAO-HelloWorld-Servant" version="1.0">
+ <pkgtype>CIAO Servant</pkgtype>
+ <title>Hello World Servants</title>
+ <author>
+ <company>Washington University in St. Louis</company>
+ <webpage href="http://www.cs.wustl.edu/~doc/"/>
+ </author>
+ <description>A Hello World executor implementation.</description>
+ <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/>
+ <idl id="IDL:HelloWorld:1.0" homeid="IDL:HelloHome:1.0">
+ <fileinarchive name="hello.idl"/>
+ </idl>
+
+ <!-- Duplicate information. We should use the copy in hello.csd -->
+ <!-- So, do we really need this one? -->
+ <descriptor type="CORBA Component">
+ <fileinarchive name="hello.ccd"/>
+ </descriptor>
+
+ <implementation id="DCE:05833d92-4783-4b85-ac14-e2575dac26f7">
+ <!-- The following stuff should match those defined in csd file. -->
+ <os name="WinNT" version="4.0"/>
+ <os name="WinXP" version="5.0"/>
+ <processor name="x86"/>
+ <compile name="MSVC" version="6.0"/>
+ <programminglanguage name="C++"/>
+ <dependency type="ORB">
+ <name>TAO</name>
+ </dependency>
+
+ <code>
+ <!-- No need to specify extension below since ACE takes care of that, -->
+ <fileinarchive name="hello_svnt"/>
+ <entrypoint>createHelloHome_Servant</entrypoint>
+ </code>
+
+ </implementation>
+
+ <!-- Let's add more implementation description later when we try to -->
+ <!-- compile this stuff on, say, Solaris and Linux. -->
+
+</softpkg>
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp b/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp
new file mode 100644
index 00000000000..c4c0f3a86d3
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp
@@ -0,0 +1,52 @@
+// $Id$
+
+#include "hello_exec.h"
+
+HelloWorld_Impl::HelloWorld_Impl ()
+{
+}
+
+HelloWorld_Impl::~HelloWorld_Impl
+ ()
+{
+}
+
+char *
+HelloWorld_Impl::sayhello (const char *username
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ static const char *fmt = "Hello World message for ";
+
+ CORBA::String_var str =
+ CORBA::string_alloc (ACE_OS::strlen (fmt) +
+ ACE_OS::strlen (username) +
+ 1);
+
+ ACE_OS::strcpy (str.inout (), fmt);
+ ACE_OS::strcat (str.inout (), username);
+
+ return str._retn ();
+}
+
+HelloHome_Impl::HelloHome_Impl ()
+{
+}
+
+HelloHome_Impl::~HelloHome_Impl ()
+{
+}
+
+Components::EnterpriseComponent_ptr
+HelloHome_Impl::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((Components::CCMException,
+ CORBA::SystemException))
+{
+ return new HelloWorld_Impl ();
+}
+
+extern "C" HELLO_EXEC_Export ::Components::HomeExecutorBase_ptr
+createHelloHome_Impl (void)
+{
+ return new HelloHome_Impl ();
+}
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec.h b/TAO/CIAO/docs/tutorial/Hello/hello_exec.h
new file mode 100644
index 00000000000..0fdf42e4c2e
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello_exec.h
@@ -0,0 +1,54 @@
+// $Id$
+
+// This file contains executor implementations.
+
+#if !defined (HELLO_EXECUTORS_H)
+#define HELLO_EXECUTORS_H
+
+#include "helloEC.h"
+#include "hello_exec_export.h"
+#include "tao/LocalObject.h"
+
+class HelloWorld_Impl :
+ public virtual CCM_HelloWorld,
+ public virtual TAO_Local_RefCounted_Object
+{
+public:
+ /// Default ctor.
+ HelloWorld_Impl ();
+
+ /// Default dtor.
+ ~HelloWorld_Impl ();
+
+ virtual char *sayhello (const char *username
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+};
+
+class HelloHome_Impl :
+ public virtual CCM_HelloHome,
+ public virtual TAO_Local_RefCounted_Object
+{
+public:
+ /// Default ctor.
+ HelloHome_Impl ();
+
+ /// Default dtor.
+ ~HelloHome_Impl ();
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((Components::CCMException,
+ CORBA::SystemException));
+};
+
+// We still need to figure out a way to clean up the object created by
+// the factory correctly. Like we did in ACE_FACTORY macro, with a
+// Gobbler function.
+
+extern "C" HELLO_EXEC_Export ::Components::HomeExecutorBase_ptr
+createHelloHome_Impl (void);
+
+#endif /* HELLO_EXECUTORS_H */
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h b/TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h
new file mode 100644
index 00000000000..9ed6e395b0f
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello_exec_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl HELLO_EXEC
+// ------------------------------
+#ifndef HELLO_EXEC_EXPORT_H
+#define HELLO_EXEC_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (HELLO_EXEC_HAS_DLL)
+# define HELLO_EXEC_HAS_DLL 1
+#endif /* ! HELLO_EXEC_HAS_DLL */
+
+#if defined (HELLO_EXEC_HAS_DLL) && (HELLO_EXEC_HAS_DLL == 1)
+# if defined (HELLO_EXEC_BUILD_DLL)
+# define HELLO_EXEC_Export ACE_Proper_Export_Flag
+# define HELLO_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define HELLO_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* HELLO_EXEC_BUILD_DLL */
+# define HELLO_EXEC_Export ACE_Proper_Import_Flag
+# define HELLO_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define HELLO_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* HELLO_EXEC_BUILD_DLL */
+#else /* HELLO_EXEC_HAS_DLL == 1 */
+# define HELLO_EXEC_Export
+# define HELLO_EXEC_SINGLETON_DECLARATION(T)
+# define HELLO_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* HELLO_EXEC_HAS_DLL == 1 */
+
+// Set HELLO_EXEC_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (HELLO_EXEC_NTRACE)
+# if (ACE_NTRACE == 1)
+# define HELLO_EXEC_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define HELLO_EXEC_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !HELLO_EXEC_NTRACE */
+
+#if (HELLO_EXEC_NTRACE == 1)
+# define HELLO_EXEC_TRACE(X)
+#else /* (HELLO_EXEC_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define HELLO_EXEC_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (HELLO_EXEC_NTRACE == 1) */
+
+#endif /* HELLO_EXEC_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h b/TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h
new file mode 100644
index 00000000000..9a004d9a06b
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello_stub_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl HELLO_STUB
+// ------------------------------
+#ifndef HELLO_STUB_EXPORT_H
+#define HELLO_STUB_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (HELLO_STUB_HAS_DLL)
+# define HELLO_STUB_HAS_DLL 1
+#endif /* ! HELLO_STUB_HAS_DLL */
+
+#if defined (HELLO_STUB_HAS_DLL) && (HELLO_STUB_HAS_DLL == 1)
+# if defined (HELLO_STUB_BUILD_DLL)
+# define HELLO_STUB_Export ACE_Proper_Export_Flag
+# define HELLO_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define HELLO_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* HELLO_STUB_BUILD_DLL */
+# define HELLO_STUB_Export ACE_Proper_Import_Flag
+# define HELLO_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define HELLO_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* HELLO_STUB_BUILD_DLL */
+#else /* HELLO_STUB_HAS_DLL == 1 */
+# define HELLO_STUB_Export
+# define HELLO_STUB_SINGLETON_DECLARATION(T)
+# define HELLO_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* HELLO_STUB_HAS_DLL == 1 */
+
+// Set HELLO_STUB_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (HELLO_STUB_NTRACE)
+# if (ACE_NTRACE == 1)
+# define HELLO_STUB_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define HELLO_STUB_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !HELLO_STUB_NTRACE */
+
+#if (HELLO_STUB_NTRACE == 1)
+# define HELLO_STUB_TRACE(X)
+#else /* (HELLO_STUB_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define HELLO_STUB_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (HELLO_STUB_NTRACE == 1) */
+
+#endif /* HELLO_STUB_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h b/TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h
new file mode 100644
index 00000000000..6cd3a02b663
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello_svnt_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl HELLO_SVNT
+// ------------------------------
+#ifndef HELLO_SVNT_EXPORT_H
+#define HELLO_SVNT_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (HELLO_SVNT_HAS_DLL)
+# define HELLO_SVNT_HAS_DLL 1
+#endif /* ! HELLO_SVNT_HAS_DLL */
+
+#if defined (HELLO_SVNT_HAS_DLL) && (HELLO_SVNT_HAS_DLL == 1)
+# if defined (HELLO_SVNT_BUILD_DLL)
+# define HELLO_SVNT_Export ACE_Proper_Export_Flag
+# define HELLO_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define HELLO_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* HELLO_SVNT_BUILD_DLL */
+# define HELLO_SVNT_Export ACE_Proper_Import_Flag
+# define HELLO_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define HELLO_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* HELLO_SVNT_BUILD_DLL */
+#else /* HELLO_SVNT_HAS_DLL == 1 */
+# define HELLO_SVNT_Export
+# define HELLO_SVNT_SINGLETON_DECLARATION(T)
+# define HELLO_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* HELLO_SVNT_HAS_DLL == 1 */
+
+// Set HELLO_SVNT_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (HELLO_SVNT_NTRACE)
+# if (ACE_NTRACE == 1)
+# define HELLO_SVNT_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define HELLO_SVNT_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !HELLO_SVNT_NTRACE */
+
+#if (HELLO_SVNT_NTRACE == 1)
+# define HELLO_SVNT_TRACE(X)
+#else /* (HELLO_SVNT_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define HELLO_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (HELLO_SVNT_NTRACE == 1) */
+
+#endif /* HELLO_SVNT_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/docs/tutorial/Hello/index.html b/TAO/CIAO/docs/tutorial/Hello/index.html
deleted file mode 100644
index 2159f007ad7..00000000000
--- a/TAO/CIAO/docs/tutorial/Hello/index.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<!--Made by lut <lu@dre.vanderbilt.edu>-->
-<!--$Id$-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Step-By-Step of How to build a CIAO application</title>
-</head>
-
-<body
- text = "#000000"
- link = "#000fff"
- vLink= "#ff0f0f"
- aLink = "#0000ff"
- bgColor = "#ffffff">
-
-<hr>
-<h2>Simple <a href="http://www.dre.vanderbilt.edu/CIAO">CIAO</a> tutorial</h2>
-<hr>
-<b>Note:</b>
-<li><a href="http://www.dre.vanderbilt.edu/cosmic">CoSMIC</a> tools are not used in this tutorial.</li>
-<li>This is only a <em>GENERAL</em> way of building up a CIAO application. The user could always change the process in his own way. For example: the IDL file content, the project structure etc.</li>
-<li>To download the code please refer to the CVS repository @ $CIAO_ROOT/examples/Hello</li>
-<li>If you just want to try the example you could jump to the <em>Make</em> then the <em>Run</em> section.</li>
-<hr>
-
-<h2>Example Description</h2>
-This Hello example is contructed in the following ways:
-<li>1. There are 2 components in the system: Sender and Receiver</li>
-<li>2. The Sender will send out the timeout event to the Receiver.</li>
-<li>3. Upon receiving the timeout event, the Receiver will go and fetch data from the Sender. </li>
-<hr>
-
-<h2>Step-By-Step</h2>
-<hr>
-<ul><h3>Hello_Base</h3>
-<li>1. Write an IDL file (Hello_Base.idl) which contains all the interfaces and events common to all the components. The reason we do this is becuse the generated lib of this idl file will be linked in by all the components in the system. To reduce the size of the component lib we have to include only the necesary part. In this example, we have an eventtype <code>timeout</code> and an interface <code>message</code>, which are used by both the Sender and the Receiver, so we put both of them in Hello.idl.</li>
-
-<li>2. Use <code>$CIAO_ROOT/bin/generate_component_mpc.pl -n Hello_Base</code> to generate the <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> file for ITS_Base. Note: There are only 2 projects in the mpc file, Hello_stub and Hello_svnt.</li>
-
-<li>3. Open the mpc file and follow the instructions below</li>
-<ul>For the project <code>Hello_Base_svnt</code>:
- <li>Change the parent prject from <code>ciao_svnt</code> to <code>ciao_server.<code></li>
- <li>Delete the <code>IDL_Files</code> and <code>CIDL_Files</code> part.</li>
- <li>Delete all the files in the <code>Source_File</code> part except <code>Hello_BaseS.cpp.</code></li>
-</ul>
-
-<li>4. Follow the instruction from the output of the last step, use the perl script (generate_export_file.pl) to generate the Export files.</li>
-</ul>
-
-<hr>
-
-<ul><h3>For Every Components</h3>
-
-<li>1. Use: <br>
-<ul>
-<code>$CIAO_ROOT/bin/generate_component_mpc.pl -p Hello_Base Sender <br>
- $$CIAO_ROOT/bin/generate_component_mpc.pl -p Hello_Base Receiver
-</code><br></ul>
-Note:
-<ul>
-<li>I have different directories for Hello_Base/Sender/Receiver respectively.</li>
-<li>For the <code>_exec</code> part of the mpc file(I user Sender here as an exmaple):</li>
-<ul>
- Add <code>SenderEI.idl</code> to the <code>IDL_Files</cdoe> <br>
- Add <code>SenderEIC.cpp</code> to the <code>Source_Files</cdoe>
-</ul>
-
-<li>For every <code>_stub</code> project, add:<br>
- <code>"libs += Hello_Base_stub"</code><br>
-
-</ul>
-
-<li>2. Use the export script to generate the export files(3 files per compoennt).</li>
-
-<li>3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface <code>trigger</code> specific to the Sender.</li>
-
-<li>4. Write the EI.idl file for every component. This file defines the local interfaces for the component.</li>
-
-<li>5. Write the CIDL file for every component.</li>
-
-<li>6. Write <code>_exec.h</code> and <code>_exec.cpp</code> files which actually implement the compnent.</li>
-<br>
-Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can delcare yourself as a CIAO programmer.
-
-<hr>
-
-<h3>The Entry Point</h3>
-After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence I created a TAO application called starter. The starter will call on a sepcial trigger interface on the Sender to get the whole process started. The starter program should collocate with Sender because it reads in the ior of the Sender. Please see the the last part of <code>Hello/Sender/Sender.mpc</code> file for detial.
-
-<hr>
-
-<h3>Make</h3>
-<li>Go to the top directory of your workspace and do:<br>
- <code>$ACE_ROOT/bin/mwc.pl</code>(use -type option if you are on Windows)</li>
-<li>Look at the generated Makefile(*inx) , Solution/workspace file(Windows) and you got it.</li>
-
-<hr>
-
-<h3>Assemble</h3>
-Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender wich multiple Receiver. However, you need to change the Sender.idl to make it <em>pulishes</em> timeout event instead of <em>emits</em> event.
-
-<br>
-
-<li>1. Make a new directory with name <em>descriptors</em> in your workspace</li>
-<li>2. Construct the <em>CIAO_Installation_Data.ini</em> file. You can use <code>uuidgen</code> to generate the UUIDs</li>
-
-<li>3. For every component generate the <em>.csd</em> and <em>.ssd</em> files. Follow the example carefully and make sure that you use the right UUIDs</li>
-
-<li>4. Write the <em>.cad</em> file which describes the assembly. You can choose to use <a href="http://www.dre.vanderbilt.edu/~lu/CADML">CADML</a> to generate the file.
-<br>
-Note: Please pay attention to the inter-relationship among different files, especially the relationship between the <em>.cad</em> file and <em>idl</em> file.
-</li>
-
-<hr>
-<h3>Run</h3>
-Finally you are ready to test the application you have made.
-<br><br>
-1. Run the example with a single CIAO_Daemon
-<ul>
-In <code>./descriptors</code> directory: <code>./run_test_default.pl</code> dose the following for you.
-<li>1. <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
-<li>2. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat</code></li>
-<li>3. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a default.cad</code></li>
-<li>4. <code>../Sender/starter</code> Note: you can repeat this step.</li>
-</ul>
-<br>
-
-2. Run the example with 2 CIAO_Daemons but on the same machine.
-<ul>
- In <code>./descriptors</code> directory: <code>./run_test_remote.pl</code> dose the following for you.
- <li>1. <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
- <li>2. <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:12000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
- <li>3. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat</code></li>
- <li>4. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a remote.cad</code></li>
- <li>5. <code>../Sender/starter</code> Note: you can repeat this step.</li>
-</ul>
-
-
-<br>
-
-3. Run the example with 2 CIAO_Daemons on two different hosts.
-<ul>
- In <code>./descriptors</code> directory:<br>
- Here you have to open the <em>remote.dat</em> and fill in the right URL for your hosts. You can change the port number as well, of course you will have to use the corresponding right address in your -ORBEndpoint option in the following step1 and 2.
-
- <li>1. On host "Default" <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://URL:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
- <li>2. On host "Remote" <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://URL:12000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
- For step 3 and step4 it doesn't matter where they are executed.
- <li>3. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat</code></li>
- <li>4. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a remote.cad</code></li>
- Step5 must be executed on the same host where the Sender is deployed. If you are using my <em>remote.cad</em> file then the host is the <code>Default</code> one.
- <li>5. <code>../Sender/starter</code> Note: you can repeat this step.</li>
-</ul>
-
-<br>
-If you are interested you could try to deploy multiple instances of the Receiver.
-<hr>
-<b>Email: </b><a href="mailto:"</a<ADDRESS>ciao-users@cse.wustl.edu</ADDRESS>
-</body>
-</html>
diff --git a/TAO/CIAO/docs/tutorial/Hello/run_simple_test.pl b/TAO/CIAO/docs/tutorial/Hello/run_simple_test.pl
new file mode 100755
index 00000000000..f09d29f3915
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/run_simple_test.pl
@@ -0,0 +1,47 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+# This perl script run the Hello World component using the
+# Simple Component Server
+
+use lib "../../../../../bin";
+use PerlACE::Run_Test;
+
+$iorfile = PerlACE::LocalFile ("ior");
+unlink $iorfile;
+$status = 0;
+
+$SV = new PerlACE::Process ("../../../tools/Simple_Component_Server/Simple_Component_Server",
+ "-i config -o $iorfile");
+
+$CL = new PerlACE::Process ("simple_client", "-i file://$iorfile -x");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$client = $CL->SpawnWaitKill (300);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->WaitKill (10);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/CIAO/docs/tutorial/Hello/run_test.pl b/TAO/CIAO/docs/tutorial/Hello/run_test.pl
new file mode 100755
index 00000000000..aa1c949d64d
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/run_test.pl
@@ -0,0 +1,113 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+$daemon_ior = PerlACE::LocalFile ("daemon.ior");
+$svr_ior = PerlACE::LocalFile ("server.ior");
+$home_ior = PerlACE::LocalFile ("hello.ior");
+
+unlink $daemon_ior;
+unlink $svr_ior;
+unlink $home_ior;
+
+$cs_exe = PerlACE::Process::Normalize_Executable_Name ("../../../tools/ComponentServer/ComponentServer");
+
+# CIAO Daemon command line arguments
+$daemon_args = "-o $daemon_ior -n $cs_exe";
+
+# CIAO Daemon Controller location:
+$controller = "../../../tools/Daemon/DaemonController";
+
+# Daemon controller common command line arguments
+$common_args = "-ORBInitRef CIAODaemon=file://$daemon_ior";
+
+# Daemon controller start_home command
+$start_args = "start_home -s hello.csd -m $home_ior -c $svr_ior";
+
+# Daemon controller end_home command
+$end_args = "end_home -c file://$svr_ior";
+
+# Daemon controller shutdown command
+$shutdown_args = "shutdown";
+
+# Client program command line arguments
+$cl_args = "";
+
+# Naming_Service process definition
+$DS = new PerlACE::Process ("../../../tools/Daemon/CIAO_Daemon",
+ "$daemon_args");
+
+# Client process definition
+$CL = new PerlACE::Process ("client",
+ "$cl_args");
+
+## Starting up the CIAO daemon
+$DS->Spawn ();
+if (PerlACE::waitforfile_timed ($daemon_ior, 15) == -1) {
+ print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n";
+ $DS->Kill ();
+ exit 1;
+}
+
+## Starting up a ComponentServer running the hello world home.
+$DC = new PerlACE::Process ("$controller",
+ "$common_args $start_args");
+
+$DC->SpawnWaitKill (60);
+if (PerlACE::waitforfile_timed ($home_ior, 15) == -1) {
+ print STDERR "ERROR: Could not find home ior file <$home_ior>\n";
+ $DS->Kill ();
+ exit 1;
+}
+
+
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+
+## Terminating the ComponentServer running the hello world home.
+$DC = new PerlACE::Process ("$controller",
+ "$common_args $end_args");
+
+$ctrl = $DC->SpawnWaitKill (60);
+if ($ctrl != 0) {
+ print STDERR "ERROR: Fail to end component server\n";
+ $DS->Kill ();
+ exit 1;
+}
+
+## Terminating the ComponentServer running the hello world home.
+$DC = new PerlACE::Process ("$controller",
+ "$common_args $shutdown_args");
+
+$ctrl = $DC->SpawnWaitKill (60);
+if ($ctrl != 0) {
+ print STDERR "ERROR: Fail to shutdown CIAODaemon\n";
+ $DS->Kill ();
+ exit 1;
+}
+
+$ctrl = $DS->WaitKill (60);
+if ($ctrl != 0) {
+ print STDERR "ERROR: CIAODaemon didn't shutdown gracefully $ctrl\n";
+ $DS->Kill ();
+ exit 1;
+}
+
+
+unlink $daemon_ior;
+unlink $svr_ior;
+unlink $home_ior;
+
+exit $status;
diff --git a/TAO/CIAO/docs/tutorial/Hello/simple_client.cpp b/TAO/CIAO/docs/tutorial/Hello/simple_client.cpp
new file mode 100644
index 00000000000..89fde740942
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/simple_client.cpp
@@ -0,0 +1,103 @@
+// $Id$
+
+#include "tools/Simple_Component_Server/Simple_ServerC.h"
+#include "ace/Get_Opt.h"
+#include "ace/Read_Buffer.h"
+#include "helloC.h"
+#include "ace/streams.h"
+
+char *ior = 0;
+int shutdown_server = 0;
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "i:x");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'x': // Shutdown server when exit?
+ shutdown_server = 1;
+ break;
+
+ case 'i': // get component configuration
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?': // display help for use of the server.
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-i <simple server ior>\n"
+ "-x shutdown server when exit\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // Initialize orb
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv ACE_ENV_ARG_PARAMETER);
+
+ if (parse_args (argc, argv) != 0)
+ return -1;
+
+ CORBA::Object_var obj
+ = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CIAO::Simple_Server_var cserve
+ = CIAO::Simple_Server::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Components::CCMHome_var home = cserve->get_home (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ HelloHome_var hh = HelloHome::_narrow (home.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (hh.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Argument is not a HelloHome reference\n"), -1);
+
+ HelloWorld_var hw = hh->create ();
+
+ if (CORBA::is_nil (hw.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Fail to create a HelloWorld reference\n"), -1);
+
+ CORBA::String_var hi = hw->sayhello ("Simple_Component_Server"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_INFO, "%s\n", hi.in ()));
+
+ hh->remove_component (hw.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ if (shutdown_server != 0)
+ cserve->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Who is the culprit \n");
+ cerr << "Uncaught CORBA exception" << endl;
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}