summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-12-13 02:09:35 +0000
committerwolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-12-13 02:09:35 +0000
commitbefb3663cb3b0b7f819f05b5690631c8f87edfae (patch)
treef8dbeed1e6fc7ca94a3b1574dd89e60c65cfbac9
parent04ef325205f9bf0b6df93132cfcda7f63b9925a7 (diff)
downloadATCD-befb3663cb3b0b7f819f05b5690631c8f87edfae.tar.gz
ChangeLogTag: Sat Dec 13 02:08:18 UTC 2008 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
-rw-r--r--CIAO/ChangeLog15
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask.cidl12
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask.idl19
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask.mpc128
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.cpp422
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.h165
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec_export.h58
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask_stub_export.h58
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/FTTask_svnt_export.h58
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTTask/Worker.idl7
10 files changed, 942 insertions, 0 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 3a95e0d8ab9..cb3674be090 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,18 @@
+Sat Dec 13 02:08:18 UTC 2008 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
+
+ * DAnCE/tests/CIAO/FTTask
+ * DAnCE/tests/CIAO/FTTask/Worker.idl
+ * DAnCE/tests/CIAO/FTTask/FTTask_stub_export.h
+ * DAnCE/tests/CIAO/FTTask/FTTask_exec.cpp
+ * DAnCE/tests/CIAO/FTTask/FTTask.idl
+ * DAnCE/tests/CIAO/FTTask/FTTask.cidl
+ * DAnCE/tests/CIAO/FTTask/FTTask_exec.h
+ * DAnCE/tests/CIAO/FTTask/FTTask_exec_export.h
+ * DAnCE/tests/CIAO/FTTask/FTTask.mpc
+ * DAnCE/tests/CIAO/FTTask/FTTask_svnt_export.h:
+
+ Added new component for DeCoRAM testing.
+
Sat Dec 13 00:01:24 UTC 2008 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
* ciao/FTComponentServer/CIAO_FTComponentServer.cpp:
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.cidl b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.cidl
new file mode 100644
index 00000000000..6a7b56b08db
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.cidl
@@ -0,0 +1,12 @@
+// $Id$
+
+#include "FTTask.idl"
+
+composition session FTTask_Impl
+{
+ home executor FTTaskHome_Exec
+ {
+ implements DeCoRAM::FTTaskHome;
+ manages DeCoRAMProvider_Exec;
+ };
+};
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.idl b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.idl
new file mode 100644
index 00000000000..3ffd13a07e0
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.idl
@@ -0,0 +1,19 @@
+// $Id$
+
+#include <Components.idl>
+#include <ReplicatedApplication.idl>
+#include "Worker.idl"
+
+module DeCoRAM
+{
+ component FTTask supports Worker, ReplicatedApplication
+ {
+ attribute Object COMPONENT_REFERENCE;
+ attribute short role;
+ attribute double load;
+ };
+
+ home FTTaskHome manages FTTask
+ {
+ };
+};
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.mpc b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.mpc
new file mode 100644
index 00000000000..da771303f81
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask.mpc
@@ -0,0 +1,128 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl FTTask"
+
+project(FTTask_idl_gen) : taoidldefaults, anytypecode {
+ avoids += ace_for_tao
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=FTTASK_STUB_Export \
+ -Wb,stub_export_include=FTTask_stub_export.h \
+ -Wb,skel_export_macro=FTTASK_SVNT_Export \
+ -Wb,skel_export_include=FTTask_svnt_export.h
+ idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
+
+ IDL_Files {
+ FTTask.idl
+ Worker.idl
+ }
+}
+
+project(FTTask_cidl_gen) : ciaocidldefaults, taoidldefaults {
+ avoids += ace_for_tao
+ custom_only = 1
+ cidlflags += --svnt-export-macro FTTASK_SVNT_Export \
+ --svnt-export-include FTTask_svnt_export.h
+ idlflags += -Wb,export_macro=FTTASK_EXEC_Export \
+ -Wb,export_include=FTTask_exec_export.h \
+ -SS
+
+ idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
+ cidlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
+
+ CIDL_Files {
+ FTTask.cidl
+ }
+
+ IDL_Files {
+ FTTaskE.idl
+ }
+}
+
+project(FTTask_stub) : ccm_stub {
+ avoids += ace_for_tao
+ after += FTTask_idl_gen
+
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
+
+ sharedname = FTTask_stub
+ dynamicflags = FTTASK_STUB_BUILD_DLL
+ libs += LWFT_Common LWFT_StateSyncAgent
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ FTTaskC.cpp
+ WorkerC.cpp
+ }
+
+ Header_Files {
+ FTTaskC.h
+ FTTask_stub_export.h
+ }
+
+ Inline_Files {
+ FTTaskC.inl
+ }
+}
+
+project(FTTask_exec) : ciao_executor, ciao_container_base, naming, orbsvcslib, {
+ avoids += ace_for_tao
+ after += FTTask_cidl_gen FTTask_stub
+ sharedname = FTTask_exec
+ libs += FTTask_stub CUTS CUTS_CPU_Worker
+ libpaths += $(CUTS_ROOT)/lib
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT $(CUTS_ROOT) $(CUTS_ROOT)/cuts/workers
+ dynamicflags = FTTASK_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ FTTaskEC.cpp
+ FTTask_exec.cpp
+ }
+
+ Header_Files {
+ FTTaskEC.h
+ FTTask_exec.h
+ FTTask_exec_export.h
+ }
+
+ Inline_Files {
+ FTTaskEC.inl
+ }
+}
+
+
+project(FTTask_svnt) : ciao_servant, naming {
+ avoids += ace_for_tao
+ after += FTTask_exec
+ sharedname = FTTask_svnt
+ libs += FTTask_exec \
+ FTTask_stub
+
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
+ dynamicflags = FTTASK_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ }
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ FTTaskS.cpp
+ FTTask_svnt.cpp
+ WorkerS.cpp
+ }
+
+ Header_Files {
+ FTTaskS.h
+ FTTask_svnt.h
+ FTTask_svnt_export.h
+ }
+
+ Inline_Files {
+ FTTaskS.inl
+ }
+}
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.cpp b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.cpp
new file mode 100644
index 00000000000..66e7180ce0b
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.cpp
@@ -0,0 +1,422 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include <sstream>
+#include <ace/High_Res_Timer.h>
+#include "FTTask_exec.h"
+#include "FTTask_svnt.h"
+#include "ciao/CIAO_common.h"
+#include "ciao/Containers/Container_Base.h"
+#include "ciao/FTComponentServer/Name_Helper_T.h"
+#include "orbsvcs/orbsvcs/LWFT/StateSynchronizationAgentC.h"
+#include "orbsvcs/orbsvcs/LWFT/ReplicationManagerC.h"
+
+namespace CIDL_FTTask_Impl
+{
+ //==================================================================
+ // Component Executor Implementation Class: FTTask_exec_i
+ //==================================================================
+
+ FTTask_exec_i::FTTask_exec_i (void)
+ : orb_ (CORBA::ORB::_nil ()),
+ agent_ (StateSynchronizationAgent::_nil ()),
+ context_ (DeCoRAM::CCM_FTTask_Context::_nil ()),
+ myself_ (CORBA::Object::_nil ()),
+ object_id_ ("Fault Tolerant Task"),
+ load_ (0.3),
+ primary_ (true),
+ state_ (0)
+ {
+ CIAO_TRACE ("FTTask_exec_i::FTTask_exec_i (void)");
+ }
+
+ FTTask_exec_i::~FTTask_exec_i (void)
+ {
+ CIAO_TRACE ("FTTask_exec_i::~FTTask_exec_i (void)");
+ }
+
+ // Supported or inherited operations.
+
+ void
+ FTTask_exec_i::run_task (
+ ::CORBA::Double execution_time)
+ {
+ ACE_hrtime_t start, end;
+
+ start = ACE_OS::gethrtime ();
+
+ this->cpu_.run (static_cast <size_t> (execution_time));
+
+ end = ACE_OS::gethrtime ();
+
+ CIAO_DEBUG ((LM_INFO,
+ ACE_TEXT ("Task %s #%d: start=%Tu end=%T time=%d ms"),
+ object_id_.c_str (),
+ state_,
+ start,
+ end,
+ end - start));
+ }
+
+ void
+ FTTask_exec_i::set_state (
+ const ::CORBA::Any & state_value)
+ {
+ // extract value to an intermediate long variable since it's not possible
+ // to extract to a long & directly
+ CORBA::Long value;
+
+ if (state_value >>= value)
+ state_ = value;
+ else
+ CIAO_DEBUG ((LM_WARNING,
+ "FTTask_exec_i::set_state () "
+ "could not extract state value from Any."));
+
+ CIAO_DEBUG ((LM_TRACE, "FTTask_exec_i::set_state (%d) called.\n", value));
+ }
+
+ ::CORBA::Any *
+ FTTask_exec_i::get_state ()
+ {
+ // create new any object
+ CORBA::Any_var state (new CORBA::Any);
+
+ // create intermediate object with the value
+ CORBA::Long value = state_;
+
+ ACE_DEBUG ((LM_DEBUG, "FTTask_exec_i::get_state returns %d.\n", value));
+
+ // insert value into the any object
+ *state <<= value;
+
+ return state._retn ();
+ }
+
+ ::StateSynchronizationAgent_ptr
+ FTTask_exec_i::agent ()
+ {
+ CIAO_TRACE ("FTTask_exec_i::agent () getter");
+ return StateSynchronizationAgent::_duplicate (agent_.in ());
+ }
+
+ void
+ FTTask_exec_i::agent (::StateSynchronizationAgent_ptr agent)
+ {
+ CIAO_TRACE ("FTTask_exec_i::agent () setter");
+ agent_ = agent;
+ }
+
+ char *
+ FTTask_exec_i::object_id (void)
+ {
+ CIAO_TRACE ("FTTask_exec_i::object_id () getter");
+ return CORBA::string_dup (object_id_.c_str ());
+ }
+
+ void
+ FTTask_exec_i::object_id (const char * object_id)
+ {
+ CIAO_TRACE ("FTTask_exec_i::object_id () setter");
+ object_id_ = object_id;
+ }
+
+ // Attribute operations.
+
+ ::CORBA::Object_ptr
+ FTTask_exec_i::COMPONENT_REFERENCE ()
+ {
+ CIAO_TRACE ("FTTask_exec_i::COMPONENT_REFERENCE () getter");
+ return CORBA::Object::_duplicate (myself_.in ());
+ }
+
+ void
+ FTTask_exec_i::COMPONENT_REFERENCE (::CORBA::Object_ptr COMPONENT_REFERENCE)
+ {
+ CIAO_TRACE ("FTTask_exec_i::COMPONENT_REFERENCE () setter");
+ myself_ = COMPONENT_REFERENCE;
+ }
+
+ CORBA::Double
+ FTTask_exec_i::load ()
+ {
+ return load_;
+ }
+
+ void
+ FTTask_exec_i::load (CORBA::Double load)
+ {
+ CIAO_DEBUG ((LM_DEBUG, "FTTask_exec_i::load (%d)\n", load));
+ load_ = load;
+ }
+
+ ::CORBA::Short
+ FTTask_exec_i::role ()
+ {
+ CIAO_DEBUG ((LM_DEBUG, "FTTask_exec_i::role () getter\n"));
+ if (primary_)
+ return 1;
+ else
+ return 2;
+ }
+
+ void
+ FTTask_exec_i::role (::CORBA::Short role)
+ {
+ CIAO_DEBUG ((LM_DEBUG, "FTTask_exec_i::role (%d)\n", role));
+ if (role == 1)
+ primary_ = true;
+ else
+ primary_ = false;
+ }
+
+ // Port operations.
+
+ // Operations from Components::SessionComponent
+
+ void
+ FTTask_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->context_ =
+ ::DeCoRAM::CCM_FTTask_Context::_narrow (ctx);
+
+ if (CORBA::is_nil (this->context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+
+ CIDL_FTTask_Impl::FTTask_Context * ft_context =
+ CIDL_FTTask_Impl::FTTask_Context::_narrow (context_.in ());
+
+ if (0 == ft_context)
+ {
+ CIAO_ERROR ((LM_ERROR, "could not narrow to SimpleFT_Context\n"));
+ return;
+ }
+
+ CIAO::Container_var container = ft_context->_ciao_the_Container ();
+
+ CIAO::Container_i * ci = dynamic_cast <CIAO::Container_i*> (container.in ());
+
+ if (ci == 0)
+ {
+ CIAO_ERROR ((LM_WARNING, "could not cast to Container_i\n"));
+ return;
+ }
+
+ orb_ = ci->the_ORB ();
+ }
+
+ void
+ FTTask_exec_i::configuration_complete ()
+ {
+ CIAO_TRACE ("FTTask_exec_i::configuration_complete (void)");
+
+ try
+ {
+ if (CORBA::is_nil (orb_.in ()))
+ {
+ CIAO_ERROR ((LM_WARNING, "FTTask_exec_i::configuration_complete - orb_ member is nil.\n"));
+ return;
+ }
+
+ // register application with StateSynchronizationAgent
+ Name_Helper_T <StateSynchronizationAgent> nh (orb_.in ());
+
+ CIAO_DEBUG ((LM_DEBUG, "resolving the StateSynchronizationAgent in the NamingService.\n"));
+
+ std::string ssa_path = "FLARe/" + nh.escape_dots (this->get_hostname ()) + "/" +
+ this->get_process_id () + "/StateSynchronizationAgent";
+
+ CIAO_DEBUG ((LM_DEBUG, "\tpath = %s\n", ssa_path.c_str ()));
+
+ agent_ = nh.resolve (ssa_path);
+
+ if (CORBA::is_nil (agent_.in ()))
+ {
+ CIAO_ERROR ((LM_WARNING, "FTTask_exec_i::configuration_complete - could not find agent.\n"));
+ return;
+ }
+
+ CIAO_DEBUG ((LM_DEBUG, "registering the application with the agent.\n"));
+
+ ReplicatedApplication_var myself = ReplicatedApplication::_narrow (myself_.in ());
+
+ if (CORBA::is_nil (myself.in ()))
+ {
+ CIAO_ERROR ((LM_WARNING, "FTTask_exec_i::configuration_complete - could not get reference to itself.\n"));
+ return;
+ }
+
+ agent_->register_application (object_id_.c_str (), myself.in ());
+ }
+ catch (Name_Helper_Exception & ex)
+ {
+ CIAO_ERROR ((LM_ERROR,
+ "FTTask_exec_i::configuration_complete - "
+ "caught Name_Helper_Exception: %s",
+ ex.what ()));
+ }
+ catch (CORBA::Exception &ex)
+ {
+ CIAO_ERROR ((LM_ERROR, "FTTask_exec_i::configuration_complete - caught: %s", ex._info ().c_str ()));
+ }
+ }
+
+ void
+ FTTask_exec_i::ccm_activate ()
+ {
+ CIAO_TRACE ("FTTask_exec_i::ccm_activate");
+
+ try
+ {
+ if (CORBA::is_nil (orb_.in ()))
+ {
+ CIAO_ERROR ((LM_WARNING, "FTTask_exec_i::ccm_activate - orb_ member is nil.\n"));
+ return;
+ }
+
+ // register application with ReplicationManager
+
+ CIAO_DEBUG ((LM_DEBUG, "resolving the ReplicationManager in the NamingService.\n"));
+
+ Name_Helper_T <ReplicationManager> rmh (orb_.in ());
+
+ ReplicationManager_var rm = rmh.resolve ("ReplicationManager");
+
+ std::string hn = this->get_hostname ();
+ std::string pid = this->get_process_id ();
+
+ rm->register_application (object_id_.c_str (),
+ load_,
+ hn.c_str (),
+ pid.c_str (),
+ (primary_ ? 1 : 2),
+ myself_.in ());
+
+ // publish application in NameService for the client
+ if (primary_)
+ {
+ Name_Helper_T <Worker> tnh (orb_.in ());
+
+ DeCoRAM::Worker_var ref = DeCoRAM::Worker::_narrow (myself_.in ());
+
+ tnh.bind ("FLARe/" + tnh.escape_dots (this->get_hostname ()) + "/" +
+ this->get_process_id () + "/Worker",
+ ref.in ());
+ }
+ }
+ catch (Name_Helper_Exception & ex)
+ {
+ CIAO_ERROR ((LM_ERROR,
+ "FTTask_exec_i::ccm_activate - "
+ "caught Name_Helper_Exception: %s",
+ ex.what ()));
+ }
+ catch (CORBA::Exception &ex)
+ {
+ CIAO_ERROR ((LM_ERROR, "FTTask_exec_i::ccm_activate - caught: %s", ex._info ().c_str ()));
+ }
+ }
+
+ void
+ FTTask_exec_i::ccm_passivate ()
+ {
+ CIAO_TRACE ("FTTask_exec_i::ccm_passivate");
+ }
+
+ void
+ FTTask_exec_i::ccm_remove ()
+ {
+ CIAO_TRACE ("FTTask_exec_i::ccm_remove");
+ }
+
+ std::string
+ FTTask_exec_i::get_hostname ()
+ {
+ char hn_str [100];
+ gethostname (hn_str, sizeof (hn_str));
+
+ return std::string (hn_str);
+ }
+
+
+ std::string
+ FTTask_exec_i::get_process_id ()
+ {
+ pid_t pid = ACE_OS::getpid ();
+ std::stringstream ss;
+ ss << pid;
+
+ return ss.str ();
+ }
+
+
+ //==================================================================
+ // Home Executor Implementation Class: FTTaskHome_exec_i
+ //==================================================================
+
+ FTTaskHome_exec_i::FTTaskHome_exec_i (void)
+ {
+ }
+
+ FTTaskHome_exec_i::~FTTaskHome_exec_i (void)
+ {
+ }
+
+ // Supported or inherited operations.
+
+ // Home operations.
+
+ // Factory and finder operations.
+
+ // Attribute operations.
+
+ // Implicit operations.
+
+ ::Components::EnterpriseComponent_ptr
+ FTTaskHome_exec_i::create ()
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_THROW_EX (
+ retval,
+ FTTask_exec_i,
+ ::CORBA::NO_MEMORY ());
+
+ return retval;
+ }
+
+ extern "C" FTTASK_EXEC_Export ::Components::HomeExecutorBase_ptr
+ create_DeCoRAM_FTTaskHome_Impl (void)
+ {
+ ::Components::HomeExecutorBase_ptr retval =
+ ::Components::HomeExecutorBase::_nil ();
+
+ ACE_NEW_RETURN (
+ retval,
+ FTTaskHome_exec_i,
+ ::Components::HomeExecutorBase::_nil ());
+
+ return retval;
+ }
+}
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.h b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.h
new file mode 100644
index 00000000000..bde59fa35e1
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec.h
@@ -0,0 +1,165 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_FTTASK_EXEC_H
+#define CIAO_FTTASK_EXEC_H
+
+#include /**/ "ace/pre.h"
+
+#include "FTTaskEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "FTTask_exec_export.h"
+#include "tao/LocalObject.h"
+#include "CPU/CPU_Worker.h"
+
+namespace CIDL_FTTask_Impl
+{
+ class FTTASK_EXEC_Export FTTask_exec_i
+ : public virtual DeCoRAMProvider_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ FTTask_exec_i (void);
+ virtual ~FTTask_exec_i (void);
+
+ // Supported or inherited operations.
+
+ virtual void
+ run_task (
+ ::CORBA::Double execution_time);
+
+ virtual void
+ set_state (
+ const ::CORBA::Any & state_value);
+
+ virtual ::CORBA::Any *
+ get_state ();
+
+ virtual ::StateSynchronizationAgent_ptr
+ agent ();
+
+ virtual void
+ agent (::StateSynchronizationAgent_ptr agent);
+
+ virtual char *
+ object_id ();
+
+ virtual void
+ object_id (const char * object_id);
+
+ // Attribute operations.
+
+ virtual ::CORBA::Object_ptr
+ COMPONENT_REFERENCE ();
+
+ virtual void
+ COMPONENT_REFERENCE (::CORBA::Object_ptr COMPONENT_REFERENCE);
+
+ virtual CORBA::Double
+ load ();
+
+ virtual void
+ load (CORBA::Double load);
+
+ virtual ::CORBA::Short
+ role ();
+
+ virtual void
+ role (::CORBA::Short role);
+
+ // Port operations.
+
+ // Operations from Components::SessionComponent
+
+ virtual void
+ set_session_context (
+ ::Components::SessionContext_ptr ctx);
+
+ virtual void configuration_complete ();
+
+ virtual void ccm_activate ();
+
+ virtual void ccm_passivate ();
+
+ virtual void ccm_remove ();
+
+ private:
+ /// helper function to find out about the hostname
+ std::string get_hostname ();
+
+ /// helper function to find out about the process id of the
+ /// application
+ std::string get_process_id ();
+
+ // member variables
+
+ CORBA::ORB_var orb_;
+
+ StateSynchronizationAgent_var agent_;
+
+ DeCoRAM::CCM_FTTask_Context_var context_;
+
+ CORBA::Object_var myself_;
+
+ CUTS_CPU_Worker cpu_;
+
+ std::string object_id_;
+
+ CORBA::Double load_;
+
+ bool primary_;
+
+ long state_;
+ };
+
+ class FTTASK_EXEC_Export FTTaskHome_exec_i
+ : public virtual FTTaskHome_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ FTTaskHome_exec_i (void);
+ virtual ~FTTaskHome_exec_i (void);
+
+ // Supported or inherited operations.
+
+ // Home operations.
+
+ // Factory and finder operations.
+
+ // Attribute operations.
+
+ // Implicit operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create ();
+ };
+
+ extern "C" FTTASK_EXEC_Export ::Components::HomeExecutorBase_ptr
+ create_DeCoRAM_FTTaskHome_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_FTTASK_EXEC_H */
+
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec_export.h b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec_export.h
new file mode 100644
index 00000000000..d82ac9f148c
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_exec_export.h
@@ -0,0 +1,58 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl FTTASK_EXEC
+// ------------------------------
+#ifndef FTTASK_EXEC_EXPORT_H
+#define FTTASK_EXEC_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (ACE_AS_STATIC_LIBS) && !defined (FTTASK_EXEC_HAS_DLL)
+# define FTTASK_EXEC_HAS_DLL 0
+#endif /* ACE_AS_STATIC_LIBS && FTTASK_EXEC_HAS_DLL */
+
+#if !defined (FTTASK_EXEC_HAS_DLL)
+# define FTTASK_EXEC_HAS_DLL 1
+#endif /* ! FTTASK_EXEC_HAS_DLL */
+
+#if defined (FTTASK_EXEC_HAS_DLL) && (FTTASK_EXEC_HAS_DLL == 1)
+# if defined (FTTASK_EXEC_BUILD_DLL)
+# define FTTASK_EXEC_Export ACE_Proper_Export_Flag
+# define FTTASK_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define FTTASK_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* FTTASK_EXEC_BUILD_DLL */
+# define FTTASK_EXEC_Export ACE_Proper_Import_Flag
+# define FTTASK_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define FTTASK_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* FTTASK_EXEC_BUILD_DLL */
+#else /* FTTASK_EXEC_HAS_DLL == 1 */
+# define FTTASK_EXEC_Export
+# define FTTASK_EXEC_SINGLETON_DECLARATION(T)
+# define FTTASK_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* FTTASK_EXEC_HAS_DLL == 1 */
+
+// Set FTTASK_EXEC_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (FTTASK_EXEC_NTRACE)
+# if (ACE_NTRACE == 1)
+# define FTTASK_EXEC_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define FTTASK_EXEC_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !FTTASK_EXEC_NTRACE */
+
+#if (FTTASK_EXEC_NTRACE == 1)
+# define FTTASK_EXEC_TRACE(X)
+#else /* (FTTASK_EXEC_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define FTTASK_EXEC_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (FTTASK_EXEC_NTRACE == 1) */
+
+#endif /* FTTASK_EXEC_EXPORT_H */
+
+// End of auto generated file.
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_stub_export.h b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_stub_export.h
new file mode 100644
index 00000000000..1e5ba908c2e
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_stub_export.h
@@ -0,0 +1,58 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl FTTASK_STUB
+// ------------------------------
+#ifndef FTTASK_STUB_EXPORT_H
+#define FTTASK_STUB_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (ACE_AS_STATIC_LIBS) && !defined (FTTASK_STUB_HAS_DLL)
+# define FTTASK_STUB_HAS_DLL 0
+#endif /* ACE_AS_STATIC_LIBS && FTTASK_STUB_HAS_DLL */
+
+#if !defined (FTTASK_STUB_HAS_DLL)
+# define FTTASK_STUB_HAS_DLL 1
+#endif /* ! FTTASK_STUB_HAS_DLL */
+
+#if defined (FTTASK_STUB_HAS_DLL) && (FTTASK_STUB_HAS_DLL == 1)
+# if defined (FTTASK_STUB_BUILD_DLL)
+# define FTTASK_STUB_Export ACE_Proper_Export_Flag
+# define FTTASK_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define FTTASK_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* FTTASK_STUB_BUILD_DLL */
+# define FTTASK_STUB_Export ACE_Proper_Import_Flag
+# define FTTASK_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define FTTASK_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* FTTASK_STUB_BUILD_DLL */
+#else /* FTTASK_STUB_HAS_DLL == 1 */
+# define FTTASK_STUB_Export
+# define FTTASK_STUB_SINGLETON_DECLARATION(T)
+# define FTTASK_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* FTTASK_STUB_HAS_DLL == 1 */
+
+// Set FTTASK_STUB_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (FTTASK_STUB_NTRACE)
+# if (ACE_NTRACE == 1)
+# define FTTASK_STUB_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define FTTASK_STUB_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !FTTASK_STUB_NTRACE */
+
+#if (FTTASK_STUB_NTRACE == 1)
+# define FTTASK_STUB_TRACE(X)
+#else /* (FTTASK_STUB_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define FTTASK_STUB_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (FTTASK_STUB_NTRACE == 1) */
+
+#endif /* FTTASK_STUB_EXPORT_H */
+
+// End of auto generated file.
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_svnt_export.h b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_svnt_export.h
new file mode 100644
index 00000000000..319f37af3d4
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/FTTask_svnt_export.h
@@ -0,0 +1,58 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl FTTASK_SVNT
+// ------------------------------
+#ifndef FTTASK_SVNT_EXPORT_H
+#define FTTASK_SVNT_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (ACE_AS_STATIC_LIBS) && !defined (FTTASK_SVNT_HAS_DLL)
+# define FTTASK_SVNT_HAS_DLL 0
+#endif /* ACE_AS_STATIC_LIBS && FTTASK_SVNT_HAS_DLL */
+
+#if !defined (FTTASK_SVNT_HAS_DLL)
+# define FTTASK_SVNT_HAS_DLL 1
+#endif /* ! FTTASK_SVNT_HAS_DLL */
+
+#if defined (FTTASK_SVNT_HAS_DLL) && (FTTASK_SVNT_HAS_DLL == 1)
+# if defined (FTTASK_SVNT_BUILD_DLL)
+# define FTTASK_SVNT_Export ACE_Proper_Export_Flag
+# define FTTASK_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define FTTASK_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* FTTASK_SVNT_BUILD_DLL */
+# define FTTASK_SVNT_Export ACE_Proper_Import_Flag
+# define FTTASK_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define FTTASK_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* FTTASK_SVNT_BUILD_DLL */
+#else /* FTTASK_SVNT_HAS_DLL == 1 */
+# define FTTASK_SVNT_Export
+# define FTTASK_SVNT_SINGLETON_DECLARATION(T)
+# define FTTASK_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* FTTASK_SVNT_HAS_DLL == 1 */
+
+// Set FTTASK_SVNT_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (FTTASK_SVNT_NTRACE)
+# if (ACE_NTRACE == 1)
+# define FTTASK_SVNT_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define FTTASK_SVNT_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !FTTASK_SVNT_NTRACE */
+
+#if (FTTASK_SVNT_NTRACE == 1)
+# define FTTASK_SVNT_TRACE(X)
+#else /* (FTTASK_SVNT_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define FTTASK_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (FTTASK_SVNT_NTRACE == 1) */
+
+#endif /* FTTASK_SVNT_EXPORT_H */
+
+// End of auto generated file.
diff --git a/CIAO/DAnCE/tests/CIAO/FTTask/Worker.idl b/CIAO/DAnCE/tests/CIAO/FTTask/Worker.idl
new file mode 100644
index 00000000000..0d3af16e3b7
--- /dev/null
+++ b/CIAO/DAnCE/tests/CIAO/FTTask/Worker.idl
@@ -0,0 +1,7 @@
+module DeCoRAM
+{
+ interface Worker
+ {
+ void run_task (in double execution_time);
+ };
+};