summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/tests
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/DAnCE/tests')
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc163
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl19
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl34
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp254
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp155
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp169
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp140
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/README12
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp131
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h129
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h54
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h54
-rw-r--r--CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h54
-rwxr-xr-xCIAO/DAnCE/tests/NodeApplicationTest/run_test.pl47
-rwxr-xr-xCIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl47
-rwxr-xr-xCIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl47
-rwxr-xr-xCIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl62
-rw-r--r--CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat3
18 files changed, 1574 insertions, 0 deletions
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc
new file mode 100644
index 00000000000..2cc04a9a18a
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc
@@ -0,0 +1,163 @@
+// $Id$
+
+project(NodeAppTest_RoundTrip_stub): ciao_client_dnc {
+ sharedname = NodeAppTest_RoundTrip_stub
+ after += CIAO_DnC_Server
+
+ idlflags += -Wb,stub_export_macro=NODEAPPTEST_ROUNDTRIP_STUB_Export \
+ -Wb,stub_export_include=RoundTrip_stub_export.h \
+ -Wb,skel_export_macro=NODEAPPTEST_ROUNDTRIP_SVNT_Export \
+ -Wb,skel_export_include=RoundTrip_svnt_export.h
+ dynamicflags = NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL
+
+ IDL_Files {
+ NodeAppTest_RoundTrip.idl
+ }
+
+ Source_Files {
+ NodeAppTest_RoundTripC.cpp
+ }
+
+ Header_Files {
+ NodeAppTest_RoundTripC.h
+ }
+
+ Inline_Files {
+ NodeAppTest_RoundTripC.inl
+ }
+}
+
+project(NodeAppTest_RoundTrip_svnt) : ciao_servant_dnc {
+ after += NodeAppTest_RoundTrip_stub
+ sharedname = NodeAppTest_RoundTrip_svnt
+
+ libs += NodeAppTest_RoundTrip_stub
+ idlflags += -Wb,export_macro=NODEAPPTEST_ROUNDTRIP_SVNT_Export \
+ -Wb,export_include=RoundTrip_svnt_export.h
+ dynamicflags = NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ NodeAppTest_RoundTrip.cidl
+ }
+
+ IDL_Files {
+ NodeAppTest_RoundTripE.idl
+ }
+
+ Source_Files {
+ NodeAppTest_RoundTripEC.cpp
+ NodeAppTest_RoundTripS.cpp
+ NodeAppTest_RoundTrip_svnt.cpp
+ }
+
+ Header_Files {
+ NodeAppTest_RoundTripEC.h
+ NodeAppTest_RoundTripS.h
+ NodeAppTest_RoundTrip_svnt.h
+ }
+
+ Inline_Files {
+ NodeAppTest_RoundTripEC.inl
+ NodeAppTest_RoundTripS.inl
+ }
+}
+
+project(NodeAppTest_RoundTrip_exec) : ciao_component_dnc, ciao_events_dnc, ciao_server_dnc {
+ after += NodeAppTest_RoundTrip_stub NodeAppTest_RoundTrip_svnt
+
+ sharedname = NodeAppTest_RoundTrip_exec
+ libs += NodeAppTest_RoundTrip_stub NodeAppTest_RoundTrip_svnt
+ idlflags += -Wb,export_macro=NODEAPPTEST_ROUNDTRIP_EXEC_Export \
+ -Wb,export_include=RoundTrip_exec_export.h
+ dynamicflags = NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RoundTrip_exec.cpp
+ }
+
+ Header_Files {
+ RoundTrip_exec.h
+ }
+
+ Inline_Files {
+ }
+}
+
+project (NodeAppTest_client_simple) : ciao_deployment_stub {
+ after += NodeAppTest_RoundTrip_stub
+ libs += NodeAppTest_RoundTrip_stub
+ exename += client_simple
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ NodeApp_test_client_simple.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
+project (NodeAppTest_client) : ciao_deployment_stub {
+ after += NodeAppTest_RoundTrip_stub
+ libs += NodeAppTest_RoundTrip_stub
+ exename += client
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ NodeApp_test_client.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
+project (NodeAppTest_client_ex) : ciao_deployment_stub {
+ after += NodeAppTest_RoundTrip_stub
+ libs += NodeAppTest_RoundTrip_stub
+ exename += client_ex
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ NodeApp_test_client_ex.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
+project (NodeAppTest_client_dynamic) : ciao_deployment_stub {
+ after += NodeAppTest_RoundTrip_stub
+ libs += NodeAppTest_RoundTrip_stub
+ exename += client_dynamic
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ NodeApp_test_client_dynamic.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl
new file mode 100644
index 00000000000..3063a673d5a
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl
@@ -0,0 +1,19 @@
+// $Id$
+
+#ifndef NODEAPPTEST_ROUNDTRIP_CIDL
+#define NODEAPPTEST_ROUNDTRIP_CIDL
+
+#include "NodeAppTest_RoundTrip.idl"
+
+composition session RoundTrip_Impl
+{
+
+ home executor RoundTripHome_Exec
+ {
+ implements NodeAppTest::NodeAppTest_RoundTripHome;
+ manages RoundTrip_Exec;
+ };
+
+};
+
+#endif /* NODEAPPTEST_ROUNDTRIP_CIDL */
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl
new file mode 100644
index 00000000000..ca7397916b8
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl
@@ -0,0 +1,34 @@
+// $Id$
+
+//=============================================================================
+/**
+ * @file NodeAppTest_RoundTrip.idl
+ *
+ * Definition of the Component that provides the LatencyTest interface
+ *
+ */
+//=============================================================================
+#ifndef NODEAPP_ROUNDTRIP_IDL
+#define NODEAPP_ROUNDTRIP_IDL
+
+#include <Components.idl>
+
+module NodeAppTest
+{
+ interface LatencyTest
+ {
+ long cube_long (in long param);
+ };
+
+ component NodeAppTest_RoundTrip supports LatencyTest
+ {
+ provides LatencyTest facet_1;
+ provides LatencyTest facet_2;
+ };
+
+ home NodeAppTest_RoundTripHome manages NodeAppTest_RoundTrip
+ {
+ };
+
+};
+#endif /* NODEAPP_ROUNDTRIP_IDL */
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp
new file mode 100644
index 00000000000..0c4da950558
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp
@@ -0,0 +1,254 @@
+// $Id$
+
+// This test tries to install a set of components in 2 different containers, which
+// is hosted in the same NodeApplication.
+
+#include "DAnCE/Deployment/Deployment_NodeApplicationC.h"
+#include "Client_init.h"
+#include "NodeAppTest_RoundTripC.h"
+#include "ace/Get_Opt.h"
+#include <sstream>
+#include <vector>
+#include <stdlib.h>
+#include "assert.h"
+
+const char *ior = "file://test.ior";
+int comp_number = 4;
+int counter = 0;
+
+int parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:n:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ comp_number = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s \n"
+ "-k <NodeApplication ior> \n"
+ "-n <The number of component instances> \n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ std::vector<NodeAppTest::NodeAppTest_RoundTrip_var> comp_list;
+ //std::vector<NodeAppTest::NodeAppTest_RoundTrip_var>::const_iterator iter;
+
+ try
+ {
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::ULong comp_num (comp_number);
+ ACE_DEBUG ((LM_DEBUG, "CompNum: %d\n",comp_num));
+
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ CIAO::Client_init (orb.in ());
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior);
+
+ Deployment::NodeApplication_var node_app =
+ Deployment::NodeApplication::_narrow (tmp.in ());
+
+ if (CORBA::is_nil (node_app.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil nodeapplication reference <%s>\n", ior),
+ 1);
+ }
+
+ // This is what we will send out of the ContainerImplmentationInfo for the
+ // first container
+
+ Deployment::ContainerImplementationInfo container_info_1;
+ CORBA::ULong length_1 = comp_num/2;
+ container_info_1.impl_infos.length (CORBA::ULong (length_1));
+
+ CORBA::ULong i;
+ for (i = 0; i < length_1; ++i)
+ {
+ Deployment::ComponentImplementationInfo info;
+
+ std::stringstream tmp;
+ tmp << "NodeAppTest_RoundTrip:" << counter;
+ counter = counter + 1;
+
+ // Add the names and entry points of each of the DLLs
+ info.component_instance_name =
+ CORBA::string_dup (tmp.str ().c_str ());
+ info.executor_dll = CORBA::string_dup ("NodeAppTest_RoundTrip_exec");
+ info.executor_entrypt =
+ CORBA::string_dup ("createRoundTripHome_Impl");
+ info.servant_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_svnt");
+ info.servant_entrypt =
+ CORBA::string_dup (
+ "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant"
+ );
+
+ //Now add the info into the infos
+ container_info_1.impl_infos[i] = info;
+ }
+
+ // For debug purpose.
+ for (i = 0; i < comp_num/2; ++i)
+ {
+ std::stringstream tmp;
+ tmp << "NodeAppTest_RoundTrip:" << i;
+
+ // Add the names and entry points of each of the DLLs
+ ACE_DEBUG ((LM_DEBUG,
+ "The info I will send out: \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
+ container_info_1.impl_infos[i].component_instance_name.in (),
+ container_info_1.impl_infos[i].executor_dll.in (),
+ container_info_1.impl_infos[i].executor_entrypt.in (),
+ container_info_1.impl_infos[i].servant_dll.in (),
+ container_info_1.impl_infos[i].servant_entrypt.in () ));
+ }
+
+ // This is what we will send out of the ContainerImplmentationInfo for the
+ // first container
+
+ Deployment::ContainerImplementationInfo container_info_2;
+ CORBA::ULong length_2 = comp_num - comp_num/2;
+ container_info_2.impl_infos.length (CORBA::ULong (length_2));
+
+ for (i = 0; i < length_2; ++i)
+ {
+ Deployment::ComponentImplementationInfo info;
+
+ std::stringstream tmp;
+ tmp << "NodeAppTest_RoundTrip:" << counter;
+ counter = counter + 1;
+
+ // Add the names and entry points of each of the DLLs
+ info.component_instance_name =
+ CORBA::string_dup (tmp.str ().c_str ());
+ info.executor_dll = CORBA::string_dup ("NodeAppTest_RoundTrip_exec");
+ info.executor_entrypt =
+ CORBA::string_dup ("createRoundTripHome_Impl");
+ info.servant_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_svnt");
+ info.servant_entrypt =
+ CORBA::string_dup (
+ "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant"
+ );
+
+ //Now add the info into the infos
+ container_info_2.impl_infos[i] = info;
+ }
+
+ // For debug purpose.
+ for (i = 0; i < length_2; ++i)
+ {
+ std::stringstream tmp;
+ tmp << "NodeAppTest_RoundTrip:" << i;
+
+ // Add the names and entry points of each of the DLLs
+ ACE_DEBUG ((LM_DEBUG,
+ "The info I will send out: \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
+ container_info_2.impl_infos[i].component_instance_name.in (),
+ container_info_2.impl_infos[i].executor_dll.in (),
+ container_info_2.impl_infos[i].executor_entrypt.in (),
+ container_info_2.impl_infos[i].servant_dll.in (),
+ container_info_2.impl_infos[i].servant_entrypt.in () ));
+ }
+
+ // container_info.container_config is not set for now
+
+ ACE_DEBUG ((LM_DEBUG, "Try installing Homes and Components\n"));
+
+ // Create a NodeImplementationInfo sequence
+ Deployment::NodeImplementationInfo node_info;
+ node_info.impl_infos.length (2);
+ node_info.impl_infos[0] = container_info_1;
+ node_info.impl_infos[1] = container_info_2;
+
+ // Install test component and its home on NodeApplication
+ Deployment::ComponentInfos_var comp_info =
+ node_app->install (node_info);
+
+ // store the component refs
+ for (i = 0; i < comp_num; ++i)
+ {
+ comp_list.push_back (NodeAppTest::NodeAppTest_RoundTrip::_narrow
+ (comp_info[i].component_ref.in ()));
+
+ if (CORBA::is_nil (comp_list[i].in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil RoundTripHome reference: %s \n",
+ comp_info[i].component_instance_name.in ()),
+ 1);
+ }
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Installation finished successfully.\n"));
+
+ // Before we can start we have to start.
+ node_app->start ();
+
+ // Invoke Operation on the components
+ ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n"));
+
+ for (i = 0; i < comp_num; ++i)
+ {
+
+ CORBA::Long input = i;
+
+ CORBA::Long output =
+ (comp_list[i])->cube_long (input);
+
+ if (input*input*input == output)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Return values matched!! on Component: %d \n",
+ i));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Return values did not match: on Component: %d \n",
+ i));
+ ACE_OS::exit (1);
+ }
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Try removing everything\n"));
+ node_app->remove ();
+
+ ACE_DEBUG ((LM_DEBUG, "Homes and components removed successfully\n"));
+
+ orb->destroy ();
+
+ ACE_DEBUG ((LM_DEBUG, "Test success!!\n"));
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp
new file mode 100644
index 00000000000..4feda3109de
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_dynamic.cpp
@@ -0,0 +1,155 @@
+// $Id$
+
+#include "DAnCE/Deployment/Deployment_NodeApplicationC.h"
+#include "Client_init.h"
+#include "NodeAppTest_RoundTripC.h"
+#include "ace/Get_Opt.h"
+#include "assert.h"
+
+const char *ior = "file://test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s \n"
+ "-k <ComponentServer ior> \n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CIAO::Client_init (orb.in ());
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior);
+
+ Deployment::NodeApplication_var node_app =
+ Deployment::NodeApplication::_narrow(tmp.in ());
+
+ if (CORBA::is_nil (node_app.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil nodeapplication reference <%s>\n",
+ ior),
+ 1);
+ }
+
+
+ ACE_DEBUG ((LM_DEBUG, "Try installing Home and Component\n"));
+
+ Deployment::ComponentImplementationInfo info;
+
+ // Add the names and entry points of each of the DLLs
+ info.component_instance_name =
+ CORBA::string_dup ("NodeAppTest_RoundTrip");
+ info.executor_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_exec");
+ info.executor_entrypt =
+ CORBA::string_dup ("createRoundTripHome_Impl");
+ info.servant_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_svnt");
+ info.servant_entrypt =
+ CORBA::string_dup (
+ "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant"
+ );
+
+ // Create a ContainerImplementationInfo sequence
+ Deployment::ContainerImplementationInfo container_info;
+ container_info.impl_infos.length (1);
+ container_info.impl_infos[0] = info;
+
+ // Create a NodeImplementationInfo sequence
+ Deployment::NodeImplementationInfo node_info;
+ node_info.impl_infos.length (1);
+ node_info.impl_infos[0] = container_info;
+
+ // Install test component and its home on NodeApplication
+ Deployment::ComponentInfos_var comp_info =
+ node_app->install (node_info);
+
+ assert (comp_info->length () == 1); //return 1 component objeref
+
+ const CORBA::ULong i = 0;
+ Components::CCMObject_var objref = (comp_info[i]).component_ref;
+
+ NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var =
+ NodeAppTest::NodeAppTest_RoundTrip::_narrow (objref.in ());
+
+ if (CORBA::is_nil (roundtrip_var.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil RoundTrip reference\n"),
+ 1);
+ }
+
+ // Invoke Operation on the Interface
+ ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n"));
+ CORBA::Long input = 1L;
+ CORBA::Long output =
+ roundtrip_var->cube_long (input);
+
+ if (input == output)
+ ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n"));
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n"));
+ ACE_OS::exit (1);
+ }
+
+ // Install another set of components
+ ACE_DEBUG ((LM_DEBUG, "Try installing another component dynamically\n"));
+
+ // Modifying the component instance name since it must be unique
+ (node_info.impl_infos[0]).impl_infos[0].component_instance_name =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_2");
+ Deployment::ComponentInfos_var comp_info_new =
+ node_app->install (node_info);
+
+ assert (comp_info_new->length () == 1); //return 1 component objeref
+
+ ACE_DEBUG ((LM_DEBUG, "Try removing the second component and its home\n"));
+ node_app->remove_component ("NodeAppTest_RoundTrip");
+ ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n"));
+
+ ACE_DEBUG ((LM_DEBUG, "=====Try removing all remaining components and homes\n"));
+ node_app->remove ();
+ ACE_DEBUG ((LM_DEBUG, "=====Components and Homes removed successfully\n"));
+
+ orb->destroy ();
+ ACE_DEBUG ((LM_DEBUG, "=====Test success!!\n"));
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp
new file mode 100644
index 00000000000..28cf0fdc557
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp
@@ -0,0 +1,169 @@
+// $Id$
+
+#include "DAnCE/Deployment/Deployment_NodeApplicationC.h"
+#include "ciao/Client_init.h"
+#include "NodeAppTest_RoundTripC.h"
+#include "ace/Get_Opt.h"
+#include "assert.h"
+
+const char *ior = "file://test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s \n"
+ "-k <NodeApplication ior> \n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CIAO::Client_init (orb.in ());
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior);
+
+ Deployment::NodeApplication_var node_app =
+ Deployment::NodeApplication::_narrow(tmp.in ());
+
+ if (CORBA::is_nil (node_app.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil NodeApplication reference <%s>\n",
+ ior),
+ 1);
+ }
+
+
+ ACE_DEBUG ((LM_DEBUG, "Try installing Home and Component\n"));
+
+ Deployment::ComponentImplementationInfo info;
+
+ // Add the names and entry points of each of the DLLs
+ info.component_instance_name =
+ CORBA::string_dup ("NodeAppTest_RoundTrip");
+ info.executor_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_exec");
+ info.executor_entrypt =
+ CORBA::string_dup ("createRoundTripHome_Impl");
+ info.servant_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_svnt");
+ info.servant_entrypt =
+ CORBA::string_dup (
+ "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant"
+ );
+
+ // Create a ContainerImplementationInfo sequence
+ Deployment::ContainerImplementationInfo container_info;
+ container_info.impl_infos.length (1);
+ container_info.impl_infos[0] = info;
+
+ // Create a NodeImplementationInfo sequence
+ Deployment::NodeImplementationInfo node_info;
+ node_info.impl_infos.length (1);
+ node_info.impl_infos[0] = container_info;
+
+ // Install test component and its home on NodeApplication
+ Deployment::ComponentInfos_var comp_info =
+ node_app->install (node_info);
+
+ assert (comp_info->length () == 1); //return 1 component objeref
+
+ CORBA::ULong i = 0;
+ Components::CCMObject_var objref = (comp_info[i]).component_ref;
+
+ NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var =
+ NodeAppTest::NodeAppTest_RoundTrip::_narrow (objref.in ());
+
+ if (CORBA::is_nil (roundtrip_var.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil RoundTrip reference\n"),
+ 1);
+ }
+
+ // initialize the component
+ roundtrip_var->ciao_postactivate ();
+
+ //get the provided facets info.
+ Components::FacetDescriptions_var facets_info =
+ roundtrip_var->get_all_facets () ;
+
+ if ( facets_info->length () != 2 )
+ {
+ ACE_DEBUG((LM_DEBUG, "Didn't get 2 facet back! but only %d\n",
+ facets_info->length ()));
+ return 1;
+ }
+
+ // Invoke Operation on the Interface
+ ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n"));
+
+ for (i = 0; i < 2; ++i )
+ {
+ NodeAppTest::LatencyTest_var latency_var
+ = NodeAppTest::LatencyTest::_narrow ( (facets_info[i]->facet_ref ()));
+ ACE_DEBUG((LM_DEBUG, "Calling on facet %s\n", (facets_info[i]->name ())));
+
+
+ if ( CORBA::is_nil (latency_var.in ()) )
+ {
+ ACE_DEBUG((LM_DEBUG, "get nil latency ref for facet%d\n", i));
+ return 1;
+ }
+
+ CORBA::Long input = 1L;
+ CORBA::Long output =
+ latency_var->cube_long (input);
+
+ if (input == output)
+ ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n"));
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n"));
+ ACE_OS::exit (1);
+ }
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Try removing test component and its home\n"));
+ node_app->remove ();
+ ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n"));
+
+ orb->destroy ();
+ ACE_DEBUG ((LM_DEBUG, "Test success!!\n"));
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp
new file mode 100644
index 00000000000..1670995ad58
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp
@@ -0,0 +1,140 @@
+// $Id$
+
+#include "DAnCE/Deployment/Deployment_NodeApplicationC.h"
+#include "Client_init.h"
+#include "NodeAppTest_RoundTripC.h"
+#include "ace/Get_Opt.h"
+#include "assert.h"
+
+const char *ior = "file://test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s \n"
+ "-k <ComponentServer ior> \n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CIAO::Client_init (orb.in ());
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior);
+
+ Deployment::NodeApplication_var node_app =
+ Deployment::NodeApplication::_narrow(tmp.in ());
+
+ if (CORBA::is_nil (node_app.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil nodeapplication reference <%s>\n",
+ ior),
+ 1);
+ }
+
+
+ ACE_DEBUG ((LM_DEBUG, "Try installing Home and Component\n"));
+
+ Deployment::ComponentImplementationInfo info;
+
+ // Add the names and entry points of each of the DLLs
+ info.component_instance_name =
+ CORBA::string_dup ("NodeAppTest_RoundTrip");
+ info.executor_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_exec");
+ info.executor_entrypt =
+ CORBA::string_dup ("createRoundTripHome_Impl");
+ info.servant_dll =
+ CORBA::string_dup ("NodeAppTest_RoundTrip_svnt");
+ info.servant_entrypt =
+ CORBA::string_dup (
+ "create_NodeAppTest_NodeAppTest_RoundTripHome_Servant"
+ );
+
+ // Create a ContainerImplementationInfo sequence
+ Deployment::ContainerImplementationInfo container_info;
+ container_info.impl_infos.length (1);
+ container_info.impl_infos[0] = info;
+
+ // Create a NodeImplementationInfo sequence
+ Deployment::NodeImplementationInfo node_info;
+ node_info.impl_infos.length (1);
+ node_info.impl_infos[0] = container_info;
+
+ // Install test component and its home on NodeApplication
+ Deployment::ComponentInfos_var comp_info =
+ node_app->install (node_info);
+
+ assert (comp_info->length () == 1); //return 1 component objeref
+
+ const CORBA::ULong i = 0;
+ Components::CCMObject_var objref = (comp_info[i]).component_ref;
+
+ NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var =
+ NodeAppTest::NodeAppTest_RoundTrip::_narrow (objref.in ());
+
+ if (CORBA::is_nil (roundtrip_var.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil RoundTrip reference\n"),
+ 1);
+ }
+
+ // Invoke Operation on the Interface
+ ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n"));
+ CORBA::Long input = 1L;
+ CORBA::Long output =
+ roundtrip_var->cube_long (input);
+
+ if (input == output)
+ ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n"));
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n"));
+ ACE_OS::exit (1);
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Try removing test component and its home\n"));
+ node_app->remove ();
+ ACE_DEBUG ((LM_DEBUG, "Component and Home removed successfully\n"));
+
+ orb->destroy ();
+ ACE_DEBUG ((LM_DEBUG, "Test success!!\n"));
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/README b/CIAO/DAnCE/tests/NodeApplicationTest/README
new file mode 100644
index 00000000000..ea8fc438089
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/README
@@ -0,0 +1,12 @@
+$Id$
+This directory contains the basic testing program for NodeApplication.
+
+client_simple: Test the basic home installation and component creation.
+
+client: Test the installation of several homes and components.
+ In this test I use the more convenient method provided
+ by the NodeApplication to insall multiple components. Aslo
+ a remove method is called to easily remove all homes and components.
+
+client_ex: Test the get_all_facet methods provided in the servant of the
+ component.
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp
new file mode 100644
index 00000000000..044e6acc8af
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp
@@ -0,0 +1,131 @@
+// $Id$
+
+#include "RoundTrip_exec.h"
+#include "CIAO_common.h"
+
+//-- ACE Scheduling Params
+#include "ace/OS_NS_errno.h"
+
+//=================================================================
+
+namespace CIDL_RoundTrip_Impl
+{
+ RoundTrip_exec_i::RoundTrip_exec_i ()
+ {
+
+ }
+
+ RoundTrip_exec_i::~RoundTrip_exec_i ()
+ {
+ }
+
+ NodeAppTest::CCM_LatencyTest_ptr
+ RoundTrip_exec_i::get_facet_1 ()
+ {
+ return new LatencyTest_Impl;
+ }
+
+ NodeAppTest::CCM_LatencyTest_ptr
+ RoundTrip_exec_i::get_facet_2 ()
+ {
+ return new LatencyTest_Impl;
+ }
+
+ CORBA::Long
+ RoundTrip_exec_i::cube_long (CORBA::Long data)
+ {
+ return data * data * data;
+ }
+
+ // Operations from Components::SessionComponent
+ void
+ RoundTrip_exec_i::set_session_context (Components::SessionContext_ptr)
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "RoundTrip_exec_i::set_session_context\n"));
+ }
+ }
+
+ void
+ RoundTrip_exec_i::ccm_activate ()
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ccm_activate\n"));
+ }
+
+ }
+
+ void
+ RoundTrip_exec_i::ccm_passivate ()
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ccm_passivate\n"));
+ }
+ }
+
+ void
+ RoundTrip_exec_i::ccm_remove ()
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ccm_remove\n"));
+ }
+ }
+
+ void
+ RoundTrip_exec_i::ciao_preactivate ()
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ciao_preactivate\n"));
+ }
+
+ }
+
+ void
+ RoundTrip_exec_i::ciao_postactivate ()
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RoundTrip_exec_i::ciao_postactivate\n"));
+ }
+ }
+
+ RoundTripHome_exec_i::RoundTripHome_exec_i ()
+ {
+ }
+
+ RoundTripHome_exec_i::~RoundTripHome_exec_i ()
+ {
+ }
+
+ ::Components::EnterpriseComponent_ptr
+ RoundTripHome_exec_i::create ()
+ {
+ return new RoundTrip_exec_i;
+ }
+
+ // Implementation for the probided inferface.
+ CORBA::Long
+ LatencyTest_Impl::cube_long (CORBA::Long data)
+ {
+ return data*data*data;
+ }
+
+ extern "C" NODEAPPTEST_ROUNDTRIP_EXEC_Export
+ ::Components::HomeExecutorBase_ptr
+ createRoundTripHome_Impl (void)
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Creating Round_trip impl\n"));
+ }
+
+ return new RoundTripHome_exec_i ();
+ }
+}
+
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h
new file mode 100644
index 00000000000..7e9916e14cc
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+
+//============================================================
+/**
+ * @file RoundTrip_exec.h
+ *
+ * $Id$
+ *
+ * Header file for the Executor implementation.
+ *
+ * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
+ */
+//============================================================
+
+#ifndef NODEAPP_ROUNDTRIP_EXEC_H
+#define NODEAPP_ROUNDTRIP_EXEC_H
+
+#include "NodeAppTest_RoundTripEC.h"
+#include "RoundTrip_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIDL_RoundTrip_Impl
+{
+
+ /**
+ * @class RoundTrip_exec_i
+ *
+ * RoundTrip executor implementation class.
+ */
+ class NODEAPPTEST_ROUNDTRIP_EXEC_Export RoundTrip_exec_i
+ : public virtual NodeAppTest::LatencyTest,
+ public virtual RoundTrip_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+
+ public:
+ /// Default constructor.
+ RoundTrip_exec_i ();
+
+ /// Operation to test the data
+ virtual CORBA::Long cube_long (CORBA::Long data);
+
+ /*
+ virtual ::NodeAppTest::CCM_LatencyTest*
+ get_latency ();
+ */
+
+ NodeAppTest::CCM_LatencyTest_ptr get_facet_1();
+
+
+ NodeAppTest::CCM_LatencyTest_ptr
+ get_facet_2();
+
+ // Operations from Components::SessionComponent
+ virtual void set_session_context (Components::SessionContext_ptr ctx);
+
+ virtual void ccm_activate ();
+
+ virtual void ccm_passivate ();
+
+ virtual void ccm_remove ();
+
+ /// Helper function to be called back by timeout_Handler
+ void pulse (void);
+
+ // CIAO defined methods
+ virtual void ciao_preactivate ();
+
+ virtual void ciao_postactivate ();
+
+ protected:
+
+ /// Destructor.
+ /**
+ * Protected destructor to enforce proper memory management
+ * through the reference counting mechanism.
+ */
+ ~RoundTrip_exec_i ();
+
+ };
+
+ //
+ //
+ //
+ class LatencyTest_Impl : public virtual NodeAppTest::CCM_LatencyTest,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ LatencyTest_Impl ()
+ {
+ }
+
+ virtual CORBA::Long cube_long (CORBA::Long data);
+ };
+
+ /**
+ * @class RoundTripHome_exec_i
+ *
+ * RoundTrip home executor implementation class.
+ */
+ class NODEAPPTEST_ROUNDTRIP_EXEC_Export RoundTripHome_exec_i :
+ public virtual RoundTripHome_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default ctor.
+ RoundTripHome_exec_i ();
+
+ // Implicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create ();
+
+ protected:
+
+ /// Destructor.
+ /**
+ * Protected destructor to enforce proper memory management
+ * through the reference counting mechanism.
+ */
+ ~RoundTripHome_exec_i ();
+
+ };
+
+ extern "C" NODEAPPTEST_ROUNDTRIP_EXEC_Export
+ ::Components::HomeExecutorBase_ptr createRoundTripHome_Impl (void);
+}
+
+#endif /* NODEAPP_ROUNDTRIPGEN_EXEC_H */
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h
new file mode 100644
index 00000000000..ba26507df22
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_EXEC
+// ------------------------------
+#ifndef NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H
+#define NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL 1
+#endif /* ! NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL */
+
+#if defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1)
+# if defined (NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_Export ACE_Proper_Export_Flag
+# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL */
+# define NODEAPPTEST_ROUNDTRIP_EXEC_Export ACE_Proper_Import_Flag
+# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL */
+#else /* NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1 */
+# define NODEAPPTEST_ROUNDTRIP_EXEC_Export
+# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1 */
+
+// Set NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE)
+# if (ACE_NTRACE == 1)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE */
+
+#if (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1)
+# define NODEAPPTEST_ROUNDTRIP_EXEC_TRACE(X)
+#else /* (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define NODEAPPTEST_ROUNDTRIP_EXEC_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) */
+
+#endif /* NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H */
+
+// End of auto generated file.
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h
new file mode 100644
index 00000000000..d82c188c509
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_STUB
+// ------------------------------
+#ifndef NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H
+#define NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL)
+# define NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL 1
+#endif /* ! NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL */
+
+#if defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1)
+# if defined (NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL)
+# define NODEAPPTEST_ROUNDTRIP_STUB_Export ACE_Proper_Export_Flag
+# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL */
+# define NODEAPPTEST_ROUNDTRIP_STUB_Export ACE_Proper_Import_Flag
+# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL */
+#else /* NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1 */
+# define NODEAPPTEST_ROUNDTRIP_STUB_Export
+# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T)
+# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1 */
+
+// Set NODEAPPTEST_ROUNDTRIP_STUB_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE)
+# if (ACE_NTRACE == 1)
+# define NODEAPPTEST_ROUNDTRIP_STUB_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define NODEAPPTEST_ROUNDTRIP_STUB_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !NODEAPPTEST_ROUNDTRIP_STUB_NTRACE */
+
+#if (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1)
+# define NODEAPPTEST_ROUNDTRIP_STUB_TRACE(X)
+#else /* (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define NODEAPPTEST_ROUNDTRIP_STUB_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) */
+
+#endif /* NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H */
+
+// End of auto generated file.
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h
new file mode 100644
index 00000000000..b84617f9ff0
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_SVNT
+// ------------------------------
+#ifndef NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H
+#define NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL 1
+#endif /* ! NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL */
+
+#if defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1)
+# if defined (NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_Export ACE_Proper_Export_Flag
+# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL */
+# define NODEAPPTEST_ROUNDTRIP_SVNT_Export ACE_Proper_Import_Flag
+# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL */
+#else /* NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1 */
+# define NODEAPPTEST_ROUNDTRIP_SVNT_Export
+# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1 */
+
+// Set NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE)
+# if (ACE_NTRACE == 1)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE */
+
+#if (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1)
+# define NODEAPPTEST_ROUNDTRIP_SVNT_TRACE(X)
+#else /* (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define NODEAPPTEST_ROUNDTRIP_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) */
+
+#endif /* NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H */
+
+// End of auto generated file.
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl b/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl
new file mode 100755
index 00000000000..e8778af9d79
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/run_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 -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
+
+for ($iter = 0; $iter <= $#ARGV; $iter++) {
+ if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") {
+ print "Run_Test Perl script for NodeApplicationTest \n\n";
+ print "run_test \n";
+ print "\n";
+ print "-h -- prints this information\n";
+ exit 0;
+ }
+}
+
+
+unlink $iorfile;
+$CIAO_ROOT=$ENV{'CIAO_ROOT'};
+
+$SV = new PerlACE::Process ("$CIAO_ROOT/bin/NodeApplication",
+ "-n -o $iorfile");
+
+$CL = new PerlACE::Process ("client",
+ "-k file://$iorfile -n 4");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
+
+$CL->SpawnWaitKill (10);
+$status = $SV->Kill (); $SV->TimedWait (1);
+
+unlink $iorfile;
+
+exit $status;
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl b/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl
new file mode 100755
index 00000000000..dfe37643354
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.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 -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
+
+for ($iter = 0; $iter <= $#ARGV; $iter++) {
+ if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") {
+ print "Run_Test Perl script for NodeApplicationTest \n\n";
+ print "run_test \n";
+ print "\n";
+ print "-h -- prints this information\n";
+ exit 0;
+ }
+}
+
+
+unlink $iorfile;
+$CIAO_ROOT=$ENV{'CIAO_ROOT'};
+
+$SV = new PerlACE::Process ("$CIAO_ROOT/bin/NodeApplication",
+ "-n -o $iorfile");
+
+$CL = new PerlACE::Process ("client_ex",
+ "-k file://$iorfile");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
+
+$CL->SpawnWaitKill (10);
+$status = $SV->Kill (); $SV->TimedWait (1);
+
+unlink $iorfile;
+
+exit $status;
diff --git a/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl b/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl
new file mode 100755
index 00000000000..b81f72846ac
--- /dev/null
+++ b/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.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 -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
+
+for ($iter = 0; $iter <= $#ARGV; $iter++) {
+ if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") {
+ print "Run_Test Perl script for NodeApplicationTest \n\n";
+ print "run_test \n";
+ print "\n";
+ print "-h -- prints this information\n";
+ exit 0;
+ }
+}
+
+
+unlink $iorfile;
+$CIAO_ROOT=$ENV{'CIAO_ROOT'};
+
+$SV = new PerlACE::Process ("$CIAO_ROOT/bin/NodeApplication",
+ "-n -o $iorfile");
+
+$CL = new PerlACE::Process ("client_simple",
+ "-k file://$iorfile ");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
+
+$CL->SpawnWaitKill (10);
+$status = $SV->Kill (); $SV->TimedWait (1);
+
+unlink $iorfile;
+
+exit $status;
diff --git a/CIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl b/CIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl
new file mode 100755
index 00000000000..1fb23e511a0
--- /dev/null
+++ b/CIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl
@@ -0,0 +1,62 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{ACE_ROOT}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+$iorfile1 = PerlACE::LocalFile ("NodeApp1.ior");
+$iorfile2 = PerlACE::LocalFile ("NodeApp2.ior");
+$iorfile3 = PerlACE::LocalFile ("NodeApp3.ior");
+$iorfile4 = PerlACE::LocalFile ("NodeApp4.ior");
+$iorfile5 = PerlACE::LocalFile ("NodeApp5.ior");
+
+#for ($iter = 0; $iter <= $#ARGV; $iter++) {
+# if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") {
+# print "Run_Test Perl script for NodeApplicationTest \n\n";
+# print "run_test \n";
+# print "\n";
+# print "-h -- prints this information\n";
+# exit 0;
+# }
+#}
+
+
+unlink $iorfile1;
+unlink $iorfile2;
+unlink $iorfile3;
+unlink $iorfile4;
+unlink $iorfile5;
+
+$CIAO_ROOT=$ENV{'CIAO_ROOT'};
+
+$SV1 = new PerlACE::Process ("$CIAO_ROOT/bin/NodeManager",
+ "-ORBEndpoint iiop://localhost:10000 -s
+$CIAO_ROOT/DAnCE/NodeApplication/NodeApplication");
+
+$SV2 = new PerlACE::Process ("$CIAO_ROOT/bin/NodeManager",
+ "-ORBEndpoint iiop://localhost:20000 -s
+$CIAO_ROOT/DAnCE/NodeApplication/NodeApplication");
+
+$SV3 = new PerlACE::Process ("$CIAO_ROOT/bin/NodeManager",
+ "-ORBEndpoint iiop://localhost:30000 -s
+$CIAO_ROOT/DAnCE/NodeApplication/NodeApplication");
+
+$SV4 = new PerlACE::Process ("$CIAO_ROOT/bin/NodeManager",
+ "-ORBEndpoint iiop://localhost:40000 -s
+$CIAO_ROOT/DAnCE/NodeApplication/NodeApplication");
+
+$SV5 = new PerlACE::Process ("$CIAO_ROOT/bin/NodeManager",
+ "-ORBEndpoint iiop://localhost:50000 -s
+$CIAO_ROOT/DAnCE/NodeApplication/NodeApplication");
+$SV1->Spawn ();
+$SV2->Spawn ();
+$SV3->Spawn ();
+$SV4->Spawn ();
+$SV5->Spawn ();
+
+sleep (99999999999);
diff --git a/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat b/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat
new file mode 100644
index 00000000000..8bd5e6a72f6
--- /dev/null
+++ b/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat
@@ -0,0 +1,3 @@
+BMClosedED corbaloc:iiop:localhost:10000/NodeManager
+EC corbaloc:iiop:localhost:20000/NodeManager
+