summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-11-15 05:12:21 +0000
committerwolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-11-15 05:12:21 +0000
commitc2f3ff8581760f4515c47c1898a279d66434ad6a (patch)
tree26a4e1cb1523550199f34da33ec8bb5e3f3ba7bc
parent61c63dc3fd63ab8269aa72da37c1d0935fee6603 (diff)
downloadATCD-c2f3ff8581760f4515c47c1898a279d66434ad6a.tar.gz
ChangeLogTag: Sat Nov 15 05:07:51 UTC 2008 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
-rw-r--r--CIAO/ChangeLog19
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT.mpc17
-rw-r--r--CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT_exec.cpp2
-rw-r--r--CIAO/ciao/FTComponentServer/AppMonitor/AppSideReg.cpp2
-rw-r--r--CIAO/ciao/FTComponentServer/AppMonitor/monitor.idl3
-rw-r--r--CIAO/ciao/FTComponentServer/CIAO_ComponentServer.mpc7
-rw-r--r--CIAO/ciao/FTComponentServer/CIAO_FTComponentServer.cpp4
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.cpp215
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.h84
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/ClientInterceptor.mpc16
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.cpp58
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.h54
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.cpp74
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.h83
-rw-r--r--CIAO/ciao/FTComponentServer/ClientInterceptor/ci_export.h58
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/Agent.idl11
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/FTCommonIdl.mpc12
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/LWFTDataStructures.idl27
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/ReplicatedApplication.idl28
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/ReplicationManager.idl33
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/StateSynchronizationAgent.idl35
-rw-r--r--CIAO/ciao/FTComponentServer/CommonIDL/ft_common_export.h58
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.cpp63
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.h64
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.cpp55
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.h65
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.idl16
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/ServerInterceptor.mpc16
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.cpp47
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.h52
-rw-r--r--CIAO/ciao/FTComponentServer/ServerInterceptor/si_export.h57
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.cpp29
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.h42
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/SSA.mpc16
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.cpp376
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.h125
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.cpp21
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.h44
-rw-r--r--CIAO/ciao/FTComponentServer/StateSynchronizationAgent/ssa_export.h116
39 files changed, 33 insertions, 2071 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 3056609e3ba..091c7edf856 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,22 @@
+Sat Nov 15 05:07:51 UTC 2008 Friedhelm Wolf <fwolf@dre.vanderbilt.edu>
+
+ * DAnCE/tests/CIAO/FTComponent/SimpleFT.mpc
+ * DAnCE/tests/CIAO/FTComponent/SimpleFT_exec.cpp
+ * ciao/FTComponentServer/AppMonitor/AppSideReg.cpp
+ * ciao/FTComponentServer/AppMonitor/monitor.idl
+ * ciao/FTComponentServer/CIAO_FTComponentServer.cpp
+ * ciao/FTComponentServer/CIAO_ComponentServer.mpc:
+
+ Changed the FTComponentServer to use the restructured orbsvcs/LWFT
+ libraries.
+
+ * ciao/FTComponentServer/StateSynchronizationAgent/
+ * ciao/FTComponentServer/CommonIDL/
+ * ciao/FTComponentServer/ServerInterceptor/
+ * ciao/FTComponentServer/ClientInterceptor/ :
+
+ Removed theses libraries.
+
Wed Nov 12 21:26:14 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu>
* DAnCE/DomainApplication/Domain_Application_Impl.cpp:
diff --git a/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT.mpc b/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT.mpc
index cff45f0b366..1ee18987e4e 100644
--- a/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT.mpc
+++ b/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT.mpc
@@ -8,8 +8,7 @@ project(SimpleFT_idl_gen) : taoidldefaults, anytypecode {
-Wb,stub_export_include=SimpleFT_stub_export.h \
-Wb,skel_export_macro=SIMPLEFT_SVNT_Export \
-Wb,skel_export_include=SimpleFT_svnt_export.h
- idlflags += -I$(CIAO_ROOT)/ccm
- idlflags += -I$(CIAO_ROOT)/ciao/FTComponentServer/CommonIDL
+ idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
IDL_Files {
SimpleFT.idl
@@ -25,10 +24,9 @@ project(SimpleFT_cidl_gen) : ciaocidldefaults, taoidldefaults {
idlflags += -Wb,export_macro=SIMPLEFT_EXEC_Export \
-Wb,export_include=SimpleFT_exec_export.h \
-SS
- idlflags += -I$(CIAO_ROOT)/ccm
- cidlflags += -I$(CIAO_ROOT)/ciao/FTComponentServer/CommonIDL
- idlflags += -I$(CIAO_ROOT)/ciao/FTComponentServer/CommonIDL
+ idlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
+ cidlflags += -I$(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
CIDL_Files {
SimpleFT.cidl
@@ -42,9 +40,8 @@ project(SimpleFT_cidl_gen) : ciaocidldefaults, taoidldefaults {
project(SimpleFT_stub) : ccm_stub {
avoids += ace_for_tao
after += SimpleFT_idl_gen
- libs += FTCommonIdl
- includes += $(CIAO_ROOT)/ciao/FTComponentServer/CommonIDL
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
sharedname = SimpleFT_stub
dynamicflags = SIMPLEFT_STUB_BUILD_DLL
@@ -72,9 +69,7 @@ project(SimpleFT_exec) : ciao_executor, orbsvcslib {
after += SimpleFT_cidl_gen SimpleFT_stub
sharedname = SimpleFT_exec
libs += SimpleFT_stub
-
- includes += $(CIAO_ROOT)/ciao/FTComponentServer/CommonIDL
-
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
dynamicflags = SIMPLEFT_EXEC_BUILD_DLL
IDL_Files {
@@ -103,8 +98,8 @@ project(SimpleFT_svnt) : ciao_servant {
sharedname = SimpleFT_svnt
libs += SimpleFT_exec \
SimpleFT_stub
- includes += $(CIAO_ROOT)/ciao/FTComponentServer/CommonIDL
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
dynamicflags = SIMPLEFT_SVNT_BUILD_DLL
CIDL_Files {
diff --git a/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT_exec.cpp b/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT_exec.cpp
index 17cf563e368..e52e6073582 100644
--- a/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT_exec.cpp
+++ b/CIAO/DAnCE/tests/CIAO/FTComponent/SimpleFT_exec.cpp
@@ -26,7 +26,7 @@
#include <orbsvcs/CosNamingC.h>
#include "ciao/CIAO_common.h"
#include "ciao/FTComponentServer/Name_Helper_T.h"
-#include "ciao/FTComponentServer/CommonIDL/ReplicationManagerC.h"
+#include "ReplicationManagerC.h"
#include "ciao/Containers/Container_Base.h"
#include "SimpleFT_svnt.h"
diff --git a/CIAO/ciao/FTComponentServer/AppMonitor/AppSideReg.cpp b/CIAO/ciao/FTComponentServer/AppMonitor/AppSideReg.cpp
index 62afb94113b..e7f148d2252 100644
--- a/CIAO/ciao/FTComponentServer/AppMonitor/AppSideReg.cpp
+++ b/CIAO/ciao/FTComponentServer/AppMonitor/AppSideReg.cpp
@@ -42,7 +42,7 @@ int AppSideReg::svc(void)
hmh.escape_dots (this->get_hostname ()) +
"/HostMonitor");
- u_short port = hmvar_->heartbeat_port (this->get_process_id ().c_str ());
+ u_short port = hmvar_->heartbeat_port ();
ACE_Barrier internal_thread_barrier (2);
monitor_ = std::auto_ptr <AppSideMonitor_Thread>
diff --git a/CIAO/ciao/FTComponentServer/AppMonitor/monitor.idl b/CIAO/ciao/FTComponentServer/AppMonitor/monitor.idl
index 150f80388ed..ed413378142 100644
--- a/CIAO/ciao/FTComponentServer/AppMonitor/monitor.idl
+++ b/CIAO/ciao/FTComponentServer/AppMonitor/monitor.idl
@@ -5,9 +5,8 @@ interface HostMonitor
{
boolean register_process (in string process_id, in string hostname, in long port);
boolean unregister_process (in string process_id);
- short heartbeat_port (in string process_id);
+ short heartbeat_port ();
void dump ();
};
#endif // MONITOR_IDL
-
diff --git a/CIAO/ciao/FTComponentServer/CIAO_ComponentServer.mpc b/CIAO/ciao/FTComponentServer/CIAO_ComponentServer.mpc
index 7d883135443..f0f1c32ae20 100644
--- a/CIAO/ciao/FTComponentServer/CIAO_ComponentServer.mpc
+++ b/CIAO/ciao/FTComponentServer/CIAO_ComponentServer.mpc
@@ -77,11 +77,10 @@ project(CIAO_FTComponentServer_svnt) : ccm_componentserver_svnt, ciao_ft_compone
project(CIAO_FTComponentServer_exe) : ccm_componentserver_svnt, portableserver, ciao_ft_componentserver_svnt, messaging, anytypecode, ciao_server, ciaoexe, ciao_session_container, ciao_ft_componentserver_configurator {
exename = ciao_ft_componentserver
- libs += CIAO_Logger SSA_Agent ServerInterceptor AppMonitor
- after += SSA_Agent AppMonitor
+ libs += CIAO_Logger AppMonitor LWFT_StateSyncAgent LWFT_ReplicationManager LWFT_Client LWFT_Server
+ after += AppMonitor
macros += CIAO_BUILD_COMPONENTSERVER_EXE
- includes += CommonIDL
- includes += .. $(TAO_ROOT)/orbsvcs/examples/FaultTolerance/FLARe/no-RT
+ includes += $(TAO_ROOT)/orbsvcs/orbsvcs/LWFT
Source_Files {
CIAO_FTComponentServer.cpp
diff --git a/CIAO/ciao/FTComponentServer/CIAO_FTComponentServer.cpp b/CIAO/ciao/FTComponentServer/CIAO_FTComponentServer.cpp
index f309c70199e..11b62b85c2c 100644
--- a/CIAO/ciao/FTComponentServer/CIAO_FTComponentServer.cpp
+++ b/CIAO/ciao/FTComponentServer/CIAO_FTComponentServer.cpp
@@ -30,8 +30,8 @@
#include "CIAO_CS_ClientC.h"
#include "Configurator_Factory.h"
#include "Configurators/Server_Configurator.h"
-#include "StateSynchronizationAgent/StateSynchronizationAgent_i.h"
-#include "ServerInterceptor/ServerORBInitializer.h"
+#include "StateSynchronizationAgent_i.h"
+#include "ServerORBInitializer.h"
#include "AppMonitor/AppSideReg.h"
#include "ReplicationManagerC.h"
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.cpp b/CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.cpp
deleted file mode 100644
index 65cdfcbaee7..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-// cvs-id : $Id$
-
-#include "Agent.h"
-
-Agent_i::Agent_i (bool proactive)
- : //failover_map_ (100),
- //secondary_map_ (100),
- //failure_map_ (100),
- proactive_(proactive),
- update_count_ (0)
-{
-}
-
-Agent_i::~Agent_i (void)
-{
-}
-
-void Agent_i::proactive(bool v)
-{
- proactive_ = v;
-}
-
-CORBA::Object_ptr
-Agent_i::next_member (const char *ior_string)
-{
- ACE_DEBUG ((LM_DEBUG, "NEXT MEMBER CALLED for ior_string = %s.\n",ior_string));
- //sleep (3);
- //if (! proactive_)
- // {
-// CORBA::Object_var object = RM_var_->get_next(ior_string);
- //return CORBA::Object::_duplicate(object.in());
-// }
-
- ACE_Guard <ACE_Thread_Mutex> guard (ior_map_mutex_);
- AGENT_RANKED_IOR_LIST ranked_ior_list;
- if (this->objectid_rankedior_map_.find(ACE_CString(ior_string),
- ranked_ior_list) == 0)
- {
- CORBA::Object_var ior (ranked_ior_list.ior_list.front());
- ranked_ior_list.ior_list.pop_front();
- this->objectid_rankedior_map_.rebind(ACE_CString(ior_string),ranked_ior_list);
- return CORBA::Object::_duplicate(ior.in());
- }
- else
- {
- ACE_DEBUG((LM_ERROR,"No ior list for tag=%s!!!\n",ior_string));
- return 0;
- }
-
-/* // this->RM_var_->next_member (ior_string);
- CORBA::Object_var replica_ior;
- CORBA::ULong failure_count = 0;
- if (this->failure_map_.find (ACE_CString(ior_string), failure_count) == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "FAILURE COUNT IS %d\n", failure_count));
- if (failure_count == 1)
- {
- if (this->failover_map_.find (ior_string, replica_ior) == 0)
- {
- this->failure_map_.rebind (ior_string, 2);
- return CORBA::Object::_duplicate (replica_ior.in ());
- }
- }
- else if (failure_count == 2)
- {
- if (this->secondary_map_.find (ior_string, replica_ior) == 0)
- {
- return CORBA::Object::_duplicate (replica_ior.in ());
- }
- }
- }
- else
- {
- for (FAILURE_MAP::iterator it = this->failure_map_.begin ();
- it != this->failure_map_.end (); ++it)
- {
- ACE_CString object_id = (*it).ext_id_;
- ACE_DEBUG((LM_DEBUG,"object_id in the failure_map_ is %s.\n",object_id.c_str()));
- }
- }
- return 0;
-*/
-}
-
-void Agent_i::
-update_rank_list (const RankList & rank_list)
-{
-/* if (update_count_ > 80)
- {
- ACE_DEBUG((LM_DEBUG,"not updated.\n"));
- return;
- }
- update_count_++;
-*/
- ACE_Guard <ACE_Thread_Mutex> guard (ior_map_mutex_);
- objectid_rankedior_map_.close();
- objectid_rankedior_map_.open();
-
- // ACE_DEBUG((LM_DEBUG,"Received rank_list length = %d.\n", rank_list.length()));
- for (size_t i = 0;i < rank_list.length();++i)
- {
- AGENT_RANKED_IOR_LIST ranked_ior_list;
- ranked_ior_list.now = rank_list[i].now;
- for (size_t j = 0; j < rank_list[i].ior_list.length(); ++j)
- {
- ranked_ior_list.ior_list.push_back(
- CORBA::Object::_duplicate(rank_list[i].ior_list[j]));
- }
- ACE_CString oid (rank_list[i].object_id);
- objectid_rankedior_map_.bind(oid,ranked_ior_list);
- //ACE_DEBUG((LM_DEBUG,"object_id=%s. ior_list_size=%d.\n",
- // oid.c_str(), ranked_ior_list.ior_list.size()));
- }
-}
-
-void Agent_i::
-initialize (CORBA::Object_ptr rm_ior)
-{
- this->RM_var_ = ReplicationManager::_narrow (rm_ior);
- Agent_var temp = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_DEBUG ((LM_DEBUG, "calling register agent\n"));
- RankList *rank_list = this->RM_var_->register_agent (temp.in ());
- update_rank_list (*rank_list);
-
-/*
- CORBA::String_var ior_string =
- this->orb_->object_to_string (temp.in ());
-
- FILE *output_file= ACE_OS::fopen (ior_file, "w");
- if (output_file == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file <%s> for writing "
- "IOR: %s",
- ior_string.in ()),
- 1);
- }
-
- ACE_OS::fprintf (output_file, "%s", ior_string.in ());
- ACE_OS::fclose (output_file);
-*/
-
-}
-
-/*
-void
-Agent_i::update_reference (const char *ior_string)
-{
- this->forward_str_ = CORBA::string_dup (ior_string);
-}
-
-void
-Agent_i::update_failover_list (const FailoverList &failover_list)
-{
- ACE_DEBUG ((LM_DEBUG, "failure map updates\n"));
- CORBA::ULong failover_list_length = failover_list.length ();
- for (CORBA::ULong i = 0; i < failover_list_length; ++i)
- {
- const char *object_id = failover_list[i];
- ACE_DEBUG ((LM_DEBUG, "OBJECT ID is %s\n", object_id));
- this->failure_map_.rebind (object_id, 2);
- }
-}
-
-void
-Agent_i::update_failover (const char * object_id,
- CORBA::Object_ptr next_member)
-{
- ACE_DEBUG ((LM_DEBUG, "calling update next member\n"));
- this->failover_map_.rebind (object_id,
- CORBA::Object::_duplicate (next_member));
-}
-
-void
-Agent_i::update_secondary (const char * object_id,
- CORBA::Object_ptr next_member)
-{
- ACE_DEBUG ((LM_DEBUG, "calling update next members\n"));
- this->secondary_map_.rebind (object_id,
- CORBA::Object::_duplicate (next_member));
-}
-
-void
-Agent_i::initialize_agent (const ReplicaList & replica_list,
- const ReplicasList & replicas_list)
-{
- ACE_DEBUG ((LM_DEBUG, "calling initialize agent\n"));
-
- CORBA::ULong replica_list_length = replica_list.length ();
- for (CORBA::ULong i = 0; i < replica_list_length; ++i)
- {
- const char *object_id = replica_list[i].object_id;
- CORBA::Object_var replica_ior = replica_list[i].next_member;
-
- if (this->failover_map_.bind (object_id, replica_ior) != 0)
- ACE_DEBUG((LM_DEBUG,"failover_map_ did not bind %s.\n", object_id));
-
- if (this->failure_map_.bind (object_id, 1) != 0)
- ACE_DEBUG((LM_DEBUG,"failure_map_ did not bind %s.\n", object_id));
-
- ACE_DEBUG((LM_DEBUG,"object_id added to failover map = %s:\n",object_id));
- }
-
- CORBA::ULong replicas_list_length = replicas_list.length ();
- for (CORBA::ULong i = 0; i < replicas_list_length; ++i)
- {
- const char *object_id = replicas_list[i].object_id;
- CORBA::Object_var replicas_ior = replicas_list[i].next_members;
- this->secondary_map_.bind (object_id, replicas_ior);
- ACE_DEBUG((LM_DEBUG,"object_id added to secondary map = %s:\n",object_id));
- }
-}
-
-*/
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.h b/CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.h
deleted file mode 100644
index 299e8ff05ec..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/Agent.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// cvs-id : $Id$
-
-#ifndef AGENT_H
-#define AGENT_H
-
-#include "ace/Hash_Map_Manager_T.h"
-#include "ace/Unbounded_Queue.h"
-#include "AgentS.h"
-#include "ReplicationManagerC.h"
-
-#include <list>
-
-struct AGENT_RANKED_IOR_LIST
-{
- bool now;
- std::list<CORBA::Object_var> ior_list;
-};
-
-
-class Agent_i : public virtual POA_Agent
-{
-public:
- Agent_i (bool proactive = true);
-
- ~Agent_i (void);
-
- virtual CORBA::Object_ptr next_member (const char * m);
-
- virtual void update_rank_list (const RankList & rank_list);
-
- void initialize (CORBA::Object_ptr);
- void proactive (bool v);
-
-/*
- virtual void update_reference (const char * m);
-
- virtual void update_failover (const char * object_id,
- CORBA::Object_ptr next_object);
-
- virtual void update_secondary (const char * object_id,
- CORBA::Object_ptr next_member);
-
-
- virtual void initialize_agent (const ReplicaList & replica_list,
- const ReplicasList & replicas_list));
-
-
- virtual void update_failover_list (const FailoverList &failover_list);
-
- typedef ACE_Hash_Map_Manager_Ex<
- ACE_CString,
- CORBA::Object_var,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> REPLICA_MAP;
-
- typedef ACE_Hash_Map_Manager_Ex<
- ACE_CString,
- CORBA::ULong,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> FAILURE_MAP;
-*/
- typedef ACE_Hash_Map_Manager_Ex<
- ACE_CString,
- AGENT_RANKED_IOR_LIST,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> OBJECTID_RANKED_IOR_MAP;
-
-
-private:
- //CORBA::String_var forward_str_;
- //REPLICA_MAP failover_map_;
- //REPLICA_MAP secondary_map_;
- //FAILURE_MAP failure_map_;
- ReplicationManager_var RM_var_;
- OBJECTID_RANKED_IOR_MAP objectid_rankedior_map_;
- ACE_Thread_Mutex ior_map_mutex_;
- bool proactive_;
- size_t update_count_;
-};
-
-#endif /* AGENT_H */
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/ClientInterceptor.mpc b/CIAO/ciao/FTComponentServer/ClientInterceptor/ClientInterceptor.mpc
deleted file mode 100644
index 00988928a6a..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/ClientInterceptor.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-project(*) : pi_server, interceptors, ciao_lib {
- dynamicflags = CI_BUILD_DLL
- idlflags += -Wb,export_macro=CI_Export -Wb,export_include=ci_export.h
- idlflags += -I../CommonIDL
- includes += ../CommonIDL
- libs += FTCommonIdl
-
- IDL_Files {
- }
-
- Source_Files {
- Agent.cpp
- Client_ORBInitializer.cpp
- Client_Request_Interceptor.cpp
- }
-}
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.cpp b/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.cpp
deleted file mode 100644
index 592fc06f663..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-
-#include "Client_ORBInitializer.h"
-
-ACE_RCSID (Hello,
- Client_ORBInitializer,
- "$Id$")
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "Client_Request_Interceptor.h"
-
-#include "tao/StringSeqC.h"
-#include "tao/ORB_Constants.h"
-#include "ace/OS_NS_string.h"
-
-Client_ORBInitializer::Client_ORBInitializer (Agent_i *agent)
- : agent_ (agent)
-{
-}
-
-Client_ORBInitializer::~Client_ORBInitializer (void)
-{
-}
-
-
-void
-Client_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr)
-{
-}
-
-void
-Client_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info)
-{
- CORBA::String_var orb_id = info->orb_id ();
-
- PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
- PortableInterceptor::ClientRequestInterceptor::_nil ();
-
- // Install the client request interceptor.
- ACE_NEW_THROW_EX (interceptor,
- Client_Request_Interceptor (orb_id.in (), agent_),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
-
- PortableInterceptor::ClientRequestInterceptor_var
- client_interceptor = interceptor;
-
- info->add_client_request_interceptor (client_interceptor.in ());
-
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.h b/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.h
deleted file mode 100644
index f78de24fcea..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_ORBInitializer.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// -*- C++ -*-
-
-#ifndef TAO_CLIENT_ORB_INITIALIZER_H
-#define TAO_CLIENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/PI/PI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "tao/LocalObject.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Agent_i;
-
-/// Client side ORB initializer.
-class Client_ORBInitializer :
- public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- Client_ORBInitializer (Agent_i *agent);
-
- ~Client_ORBInitializer (void);
-
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info);
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info);
-
-private:
- Agent_i *agent_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_CLIENT_ORB_INITIALIZER_H */
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.cpp b/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.cpp
deleted file mode 100644
index cc0c41468fb..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-
-#include "Client_Request_Interceptor.h"
-#include "ace/Log_Msg.h"
-#include "Agent.h"
-
-ACE_RCSID (Hello,
- Client_Request_Interceptor,
- "$Id$")
-
-Client_Request_Interceptor::Client_Request_Interceptor (
- const char *orb_id, Agent_i *agent)
- : orb_id_ (CORBA::string_dup (orb_id)),
- orb_ (),
- request_count_ (0),
- agent_ (agent)
-{
-}
-
-char *
-Client_Request_Interceptor::name ()
-{
- return CORBA::string_dup ("Client_Request_Interceptor");
-}
-
-void
-Client_Request_Interceptor::destroy (void)
-{
-}
-
-void
-Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr)
-{
-}
-
-void
-Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr)
-{
-}
-
-void
-Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr)
-{
-}
-
-void
-Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri)
-{
- ACE_DEBUG ((LM_DEBUG, "Catching exception\n"));
- const CORBA::ULong tagID = 9654;
- char *tag = 0;
- try
- {
- IOP::TaggedComponent_var mytag = ri->get_effective_component (tagID);
- tag = reinterpret_cast <char *> ( mytag->component_data.get_buffer ());
- ACE_CString new_string = CORBA::string_dup (tag);
- CORBA::Object_var forward = this->agent_->next_member (tag);
- ACE_THROW (PortableInterceptor::ForwardRequest (forward.in ()));
- }
- catch (CORBA::BAD_PARAM&)
- {
- ACE_DEBUG ((LM_DEBUG, "Tagged Component not found\n"));
- }
-}
-
-void
-Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr)
-{
-}
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.h b/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.h
deleted file mode 100644
index 0e80b6570a3..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/Client_Request_Interceptor.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// -*- C++ -*-
-
-#ifndef CLIENT_REQUEST_INTERCEPTOR_H
-#define CLIENT_REQUEST_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-#include "tao/ORB.h"
-#include "tao/CORBA_String.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class Agent_i;
-
-class Client_Request_Interceptor
- : public virtual PortableInterceptor::ClientRequestInterceptor,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /// Constructor.
- Client_Request_Interceptor (const char *orb_id, Agent_i *agent);
-
- /**
- * @name Methods Required by the Client Request Interceptor
- * Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all client request interceptors.
- */
- //@{
- /// Return the name of this ClientRequestinterceptor.
- virtual char * name (void);
-
- virtual void destroy (void);
-
- virtual void send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri);
-
- virtual void send_poll (
- PortableInterceptor::ClientRequestInfo_ptr ri);
-
- virtual void receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri);
-
- virtual void receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri);
-
- virtual void receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri);
- //@}
-
-private:
-
- ///The ID of the ORB this interceptor is registered with.
- CORBA::String_var orb_id_;
-
- /// Pseudo-reference to the ORB this interceptor is registered
- /// with.
- CORBA::ORB_var orb_;
-
- /// The number of requests intercepted by this interceptor.
- CORBA::ULong request_count_;
-
- Agent_i *agent_;
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* CLIENT_REQUEST_INTERCEPTOR_H */
diff --git a/CIAO/ciao/FTComponentServer/ClientInterceptor/ci_export.h b/CIAO/ciao/FTComponentServer/ClientInterceptor/ci_export.h
deleted file mode 100644
index 832307cc21a..00000000000
--- a/CIAO/ciao/FTComponentServer/ClientInterceptor/ci_export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl CI
-// ------------------------------
-#ifndef CI_EXPORT_H
-#define CI_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (CI_HAS_DLL)
-# define CI_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && CI_HAS_DLL */
-
-#if !defined (CI_HAS_DLL)
-# define CI_HAS_DLL 1
-#endif /* ! CI_HAS_DLL */
-
-#if defined (CI_HAS_DLL) && (CI_HAS_DLL == 1)
-# if defined (CI_BUILD_DLL)
-# define CI_Export ACE_Proper_Export_Flag
-# define CI_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CI_BUILD_DLL */
-# define CI_Export ACE_Proper_Import_Flag
-# define CI_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CI_BUILD_DLL */
-#else /* CI_HAS_DLL == 1 */
-# define CI_Export
-# define CI_SINGLETON_DECLARATION(T)
-# define CI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CI_HAS_DLL == 1 */
-
-// Set CI_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CI_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CI_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CI_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CI_NTRACE */
-
-#if (CI_NTRACE == 1)
-# define CI_TRACE(X)
-#else /* (CI_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CI_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CI_NTRACE == 1) */
-
-#endif /* CI_EXPORT_H */
-
-// End of auto generated file.
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/Agent.idl b/CIAO/ciao/FTComponentServer/CommonIDL/Agent.idl
deleted file mode 100644
index 030461f0deb..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/Agent.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// $Id$
-//
-
-#include "LWFTDataStructures.idl"
-
-interface Agent
-{
- Object next_member (in string m);
- void update_rank_list (in RankList rank_list);
-};
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/FTCommonIdl.mpc b/CIAO/ciao/FTComponentServer/CommonIDL/FTCommonIdl.mpc
deleted file mode 100644
index eb44cba4dc3..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/FTCommonIdl.mpc
+++ /dev/null
@@ -1,12 +0,0 @@
-project(*): taolib, taoidldefaults, ciao_lib {
- idlflags += -Wb,export_macro=FT_Common_Export -Wb,export_include=ft_common_export.h
- macros += FT_COMMON_BUILD_DLL
-
- IDL_Files {
- LWFTDataStructures.idl
- StateSynchronizationAgent.idl
- ReplicatedApplication.idl
- ReplicationManager.idl
- Agent.idl
- }
-}
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/LWFTDataStructures.idl b/CIAO/ciao/FTComponentServer/CommonIDL/LWFTDataStructures.idl
deleted file mode 100644
index 100ba1fbf9c..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/LWFTDataStructures.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file LWFTDataStructures.idl
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _LWFT_DATASTRUCTURES_IDL_
-#define _LWFT_DATASTRUCTURES_IDL_
-
-typedef sequence<Object> ObjectList;
-
-struct Rank
-{
- string object_id;
- boolean now;
- ObjectList ior_list;
-};
-
-typedef sequence<Rank> RankList;
-
-#endif /* _LWFT_DATASTRUCTURES_IDL_ */
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/ReplicatedApplication.idl b/CIAO/ciao/FTComponentServer/CommonIDL/ReplicatedApplication.idl
deleted file mode 100644
index 6df83655e66..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/ReplicatedApplication.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file ReplicatedApplication.idl
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _REPLICATED_APPLICATION_IDL_
-#define _REPLICATED_APPLICATION_IDL_
-
-interface ReplicatedApplication
-{
- /// setter method for the interal state
- /// @param state_value represents the internal state encapsulated
- /// into an any value
- void set_state (in any state_value);
-
- /// getter method the the internal state
- /// remark: it's not clear if this is necessary
- any get_state ();
-};
-
-#endif /* _REPLICATED_APPLICATION_IDL_ */
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/ReplicationManager.idl b/CIAO/ciao/FTComponentServer/CommonIDL/ReplicationManager.idl
deleted file mode 100644
index be52f27f90e..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/ReplicationManager.idl
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file ReplicationManager.idl
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _REPLICATION_MANAGER_IDL_
-#define _REPLICATION_MANAGER_IDL_
-
-#include "LWFTDataStructures.idl"
-#include "StateSynchronizationAgent.idl"
-
-interface ReplicationManager
-{
- RankList register_agent (in Object agent_reference);
- void register_application (in string object_id, in double load,
- in string host_id, in string process_id,
- in short role, in Object server_reference);
- RankList register_state_synchronization_agent (in string host_id,
- in string process_id,
- in StateSynchronizationAgent agent);
- void util_update (in string host_id, in double utilization);
- void proc_failure (in string process_id);
- Object get_next (in string object_id);
-};
-
-#endif /* _REPLICATION_MANAGER_IDL_ */
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/StateSynchronizationAgent.idl b/CIAO/ciao/FTComponentServer/CommonIDL/StateSynchronizationAgent.idl
deleted file mode 100644
index a4572c287d2..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/StateSynchronizationAgent.idl
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- IDL -*-
-
-//=============================================================================
-/**
- * @file StateSynchronizationAgent.idl
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _REPLICATION_AGENT_IDL_
-#define _REPLICATION_AGENT_IDL_
-
-#include "ReplicatedApplication.idl"
-#include "LWFTDataStructures.idl"
-
-interface StateSynchronizationAgent
-{
- /// triggers an serial update of the state information
- /// to all registered replicas
- void state_changed (in string object_id);
-
- /// used by the ReplicationManager to update information about
- /// active replicas
- void update_rank_list (in RankList replicas);
-
- /// informs the replication manager about applications for which
- /// it is responsible for replication
- void register_application (in string objec_id,
- in ReplicatedApplication app);
-};
-
-#endif /* _REPLICATION_AGENT_IDL_ */
diff --git a/CIAO/ciao/FTComponentServer/CommonIDL/ft_common_export.h b/CIAO/ciao/FTComponentServer/CommonIDL/ft_common_export.h
deleted file mode 100644
index 1eddc040b64..00000000000
--- a/CIAO/ciao/FTComponentServer/CommonIDL/ft_common_export.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl FT_Common
-// ------------------------------
-#ifndef FT_COMMON_EXPORT_H
-#define FT_COMMON_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (FT_COMMON_HAS_DLL)
-# define FT_COMMON_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && FT_COMMON_HAS_DLL */
-
-#if !defined (FT_COMMON_HAS_DLL)
-# define FT_COMMON_HAS_DLL 1
-#endif /* ! FT_COMMON_HAS_DLL */
-
-#if defined (FT_COMMON_HAS_DLL) && (FT_COMMON_HAS_DLL == 1)
-# if defined (FT_COMMON_BUILD_DLL)
-# define FT_Common_Export ACE_Proper_Export_Flag
-# define FT_COMMON_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define FT_COMMON_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* FT_COMMON_BUILD_DLL */
-# define FT_Common_Export ACE_Proper_Import_Flag
-# define FT_COMMON_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define FT_COMMON_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* FT_COMMON_BUILD_DLL */
-#else /* FT_COMMON_HAS_DLL == 1 */
-# define FT_Common_Export
-# define FT_COMMON_SINGLETON_DECLARATION(T)
-# define FT_COMMON_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* FT_COMMON_HAS_DLL == 1 */
-
-// Set FT_COMMON_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (FT_COMMON_NTRACE)
-# if (ACE_NTRACE == 1)
-# define FT_COMMON_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define FT_COMMON_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !FT_COMMON_NTRACE */
-
-#if (FT_COMMON_NTRACE == 1)
-# define FT_COMMON_TRACE(X)
-#else /* (FT_COMMON_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define FT_COMMON_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (FT_COMMON_NTRACE == 1) */
-
-#endif /* FT_COMMON_EXPORT_H */
-
-// End of auto generated file.
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.cpp b/CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.cpp
deleted file mode 100644
index 6ee65169257..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "IOR_Interceptor.h"
-#include "ObjectReferenceFactory.h"
-#include "tao/ORB_Constants.h"
-
-ACE_RCSID (Hello,
- IOR_Interceptor,
- "$Id$")
-
-IOR_Interceptor::IOR_Interceptor (void)
-{
-}
-
-char *
-IOR_Interceptor::name (void)
-{
- return CORBA::string_dup ("IOR_Interceptor");
-}
-
-void
-IOR_Interceptor::destroy (void)
-{
-}
-
-void
-IOR_Interceptor::establish_components (
- PortableInterceptor::IORInfo_ptr /* info */)
-{
-}
-
-void
-IOR_Interceptor::components_established (
- PortableInterceptor::IORInfo_ptr info)
-{
- PortableInterceptor::ObjectReferenceFactory_var old_orf =
- info->current_factory ();
-
- PortableInterceptor::ObjectReferenceFactory * tmp;
- ACE_NEW_THROW_EX (tmp,
- ObjectReferenceFactory (old_orf.in ()),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
-
- PortableInterceptor::ObjectReferenceFactory_var orf = tmp;
-
- info->current_factory (orf.in ());
-}
-
-void
-IOR_Interceptor::adapter_manager_state_changed (
- const char *,
- PortableInterceptor::AdapterState)
-{
-}
-
-void
-IOR_Interceptor:: adapter_state_changed (
- const PortableInterceptor::ObjectReferenceTemplateSeq &,
- PortableInterceptor::AdapterState)
-{
-}
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.h b/CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.h
deleted file mode 100644
index ca75d85160f..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/IOR_Interceptor.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-
-#ifndef IOR_INTERCEPTOR_H
-#define IOR_INTERCEPTOR_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/IORInterceptor/IORInterceptor.h"
-#include "tao/PortableInterceptorC.h"
-#include "tao/LocalObject.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class IOR_Interceptor
- : public virtual PortableInterceptor::IORInterceptor_3_0,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- IOR_Interceptor (void);
-
- /**
- * @name Methods Required by the IOR Interceptor Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all IOR interceptors.
- */
- //@{
- /// Return the name of this IORInterceptor.
- virtual char * name (void);
-
- /// Cleanup resources acquired by this IORInterceptor.
- virtual void destroy (void);
-
- /// Add the tagged components to the IOR.
- virtual void establish_components (
- PortableInterceptor::IORInfo_ptr info);
-
- virtual void components_established (
- PortableInterceptor::IORInfo_ptr info);
-
- virtual void adapter_manager_state_changed (
- const char * id,
- PortableInterceptor::AdapterState state);
-
- virtual void adapter_state_changed (
- const PortableInterceptor::ObjectReferenceTemplateSeq & templates,
- PortableInterceptor::AdapterState state);
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* IOR_INTERCEPTOR_H */
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.cpp b/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.cpp
deleted file mode 100644
index b3b5e80c70b..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "ObjectReferenceFactory.h"
-#include "tao/PortableServer/PortableServer.h"
-#include "tao/Stub.h"
-#include "tao/Profile.h"
-#include "tao/debug.h"
-
-ACE_RCSID (Hello,
- ObjectReferenceFactory,
- "$Id$")
-
-ObjectReferenceFactory::ObjectReferenceFactory (
- PortableInterceptor::ObjectReferenceFactory * old_orf)
- : old_orf_ (old_orf)
-{
- CORBA::add_ref (old_orf);
-}
-
-ObjectReferenceFactory::~ObjectReferenceFactory (void)
-{
-}
-
-CORBA::Object_ptr
-ObjectReferenceFactory::make_object (
- const char *repository_id,
- const PortableInterceptor::ObjectId & id)
-{
- ACE_ASSERT (repository_id != 0);
-
- CORBA::String_var s = PortableServer::ObjectId_to_string (id);
-
- CORBA::Object_var ref = this->old_orf_->make_object (repository_id, id);
-
- TAO_MProfile &mp = ref->_stubobj ()->base_profiles ();
-
- IOP::TaggedComponent mytag;
- const char* tag = s.in ();
- CORBA::ULong tag_id = 9654;
- size_t tag_length = ACE_OS::strlen (tag);
- mytag.tag = tag_id;
- mytag.component_data.length (tag_length + 1);
-
- CORBA::Octet *buf = mytag.component_data.get_buffer ();
- ACE_OS::memcpy (buf, tag, tag_length + 1);
- buf[tag_length] = '\0';
-
- const CORBA::ULong profile_count = mp.profile_count ();
-
- for (CORBA::ULong i = 0; i < profile_count; ++i)
- {
- TAO_Profile *profile = mp.get_profile (i);
- profile->add_tagged_component (mytag);
- }
-
- return ref._retn ();
-}
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.h b/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.h
deleted file mode 100644
index eec42bb929c..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- C++ -*-
-
-#ifndef TAO_OBJECT_REFERENCE_FACTORY_H
-#define TAO_OBJECT_REFERENCE_FACTORY_H
-
-#include "ObjectReferenceFactoryC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class ObjectReferenceFactory
- : public virtual OBV_lwft::ObjectReferenceFactory
- , public virtual CORBA::DefaultValueRefCountBase
-{
- public:
-
- /// Constructor
- ObjectReferenceFactory (
- PortableInterceptor::ObjectReferenceFactory * old_orf);
-
- /**
- * @name PortableInterceptor::ObjectReferenceFactory Methods
- *
- * Methods required by the
- * PortableInterceptor::ObjectReferenceFactory interface.
- */
- //@{
- virtual CORBA::Object_ptr make_object (
- const char *repository_id,
- const PortableInterceptor::ObjectId & id);
- //@}
-
-protected:
-
- /// Destructor
- /**
- * Protected destructor to enforce proper memory management via
- * reference counting.
- */
- ~ObjectReferenceFactory (void);
-
-private:
-
- /// The old ObjectReferenceFactory used to create object references.
- /**
- * This ObjectReferenceFactory will still be used when creating
- * object references. However, it will be invoked through this
- * ObjectReferenceFactory.
- */
- PortableInterceptor::ObjectReferenceFactory_var old_orf_;
-
-};
-
-
-#if defined (_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_OBJECT_REFERENCE_FACTORY_H */
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.idl b/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.idl
deleted file mode 100644
index 36623e2728d..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/ObjectReferenceFactory.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-// -*- IDL -*-
-
-#ifndef OBJECT_REFERENCE_FACTORY_IDL
-#define OBJECT_REFERENCE_FACTORY_IDL
-
-#include "tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl"
-
-module lwft
-{
-
- valuetype ObjectReferenceFactory
- : PortableInterceptor::ObjectReferenceFactory {};
-
-};
-
-#endif /* OBJECT_REFERENCE_FACTORY_IDL */
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerInterceptor.mpc b/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerInterceptor.mpc
deleted file mode 100644
index 97984c868dd..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerInterceptor.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-project(*) : rtportableserver, pi_server, interceptors, iorinterceptor, taoidldefaults, ciao_lib {
- dynamicflags = SI_BUILD_DLL
- idlflags += -Wb,export_macro=SI_Export -Wb,export_include=si_export.h
-
- IDL_Files {
- idlflags += -SS
- ObjectReferenceFactory.idl
- }
-
- Source_Files {
- ObjectReferenceFactory.cpp
- ObjectReferenceFactoryC.cpp
- ServerORBInitializer.cpp
- IOR_Interceptor.cpp
- }
-}
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.cpp b/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.cpp
deleted file mode 100644
index 0d8a3e735be..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include "ServerORBInitializer.h"
-#include "IOR_Interceptor.h"
-#include "tao/ORB_Constants.h"
-#include "tao/PortableServer/PortableServer.h"
-
-ACE_RCSID (Hello,
- ServerORBInitializer,
- "$Id$")
-
-void
-ServerORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr /* info */)
-{
-}
-
-void
-ServerORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr info)
-{
-
- CORBA::Object_var obj =
- info->resolve_initial_references ("POACurrent");
-
- PortableServer::Current_var poa_current =
- PortableServer::Current::_narrow (obj.in ());
-
- ACE_ASSERT (!CORBA::is_nil (poa_current.in ()));
-
-
- CORBA::String_var orb_id = info->orb_id ();
-
- // Create and register the test's IORInterceptor
-
- PortableInterceptor::IORInterceptor_ptr ior_intercept;
- ACE_NEW_THROW_EX (ior_intercept,
- IOR_Interceptor,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
-
- PortableInterceptor::IORInterceptor_var ior_interceptor =
- ior_intercept;
-
- info->add_ior_interceptor (ior_interceptor.in ());
-}
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.h b/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.h
deleted file mode 100644
index d89802b15d6..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/ServerORBInitializer.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- C++ -*-
-
-#ifndef SERVER_ORB_INITIALIZER_H
-#define SERVER_ORB_INITIALIZER_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/PI/PI.h"
-#include "tao/LocalObject.h"
-
-#include "si_export.h"
-
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-class SI_Export ServerORBInitializer
- : public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name Methods Required by the ORBInitializer Interface
- *
- * These are methods that must be implemented since they are pure
- * virtual in the abstract base class. They are the canonical
- * methods required for all ORB initializers.
- */
- //@{
- /// The pre-initialization hook.
- virtual void pre_init (
- PortableInterceptor::ORBInitInfo_ptr info);
-
- /// The post-initialization hook.
- virtual void post_init (
- PortableInterceptor::ORBInitInfo_ptr info);
- //@}
-
-};
-
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* SERVER_ORB_INITIALIZER_H */
diff --git a/CIAO/ciao/FTComponentServer/ServerInterceptor/si_export.h b/CIAO/ciao/FTComponentServer/ServerInterceptor/si_export.h
deleted file mode 100644
index 03f8cf1951d..00000000000
--- a/CIAO/ciao/FTComponentServer/ServerInterceptor/si_export.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl SI
-// ------------------------------
-#ifndef SI_EXPORT_H
-#define SI_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (SI_HAS_DLL)
-# define SI_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && SI_HAS_DLL */
-
-#if !defined (SI_HAS_DLL)
-# define SI_HAS_DLL 1
-#endif /* ! SI_HAS_DLL */
-
-#if defined (SI_HAS_DLL) && (SI_HAS_DLL == 1)
-# if defined (SI_BUILD_DLL)
-# define SI_Export ACE_Proper_Export_Flag
-# define SI_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define SI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* SI_BUILD_DLL */
-# define SI_Export ACE_Proper_Import_Flag
-# define SI_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define SI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* SI_BUILD_DLL */
-#else /* SI_HAS_DLL == 1 */
-# define SI_Export
-# define SI_SINGLETON_DECLARATION(T)
-# define SI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* SI_HAS_DLL == 1 */
-
-// Set SI_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (SI_NTRACE)
-# if (ACE_NTRACE == 1)
-# define SI_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define SI_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !SI_NTRACE */
-
-#if (SI_NTRACE == 1)
-# define SI_TRACE(X)
-#else /* (SI_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define SI_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (SI_NTRACE == 1) */
-
-#endif /* SI_EXPORT_H */
-
-// End of auto generated file.
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.cpp b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.cpp
deleted file mode 100644
index 00a3872d2f3..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file CorbaStateUpdate.cpp
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#include "CorbaStateUpdate.h"
-
-CorbaStateUpdate::CorbaStateUpdate(ReplicatedApplication_ptr application)
- : application_ (ReplicatedApplication::_duplicate (application))
-{
-}
-
-CorbaStateUpdate::~CorbaStateUpdate()
-{
-}
-
-void
-CorbaStateUpdate::set_state (const ::CORBA::Any & state_value)
-{
- if (!CORBA::is_nil (application_.in ()))
- application_->set_state (state_value);
-}
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.h b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.h
deleted file mode 100644
index c98d9e592f7..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/CorbaStateUpdate.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file CorbaStateUpdate.h
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _CORBA_STATE_UPDATE_H_
-#define _CORBA_STATE_UPDATE_H_
-
-#include "StatefulObject.h"
-#include "ReplicatedApplicationC.h"
-
-/**
- * @class CorbaStateUpdate
- *
- * @brief Implementation of the StatefulObject interface that uses
- * a ReplicatedApplication CORBA object to disseminate state information
- */
-class CorbaStateUpdate : public StatefulObject
-{
-public:
-
- /// ctor
- CorbaStateUpdate (ReplicatedApplication_ptr application);
-
- /// dtor
- virtual ~CorbaStateUpdate ();
-
- /// method to set the
- virtual void set_state (const ::CORBA::Any & state_value);
-
-private:
- ReplicatedApplication_var application_;
-};
-
-#endif /* _CORBA_STATE_UPDATE_H_ */
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/SSA.mpc b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/SSA.mpc
deleted file mode 100644
index fde9367460a..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/SSA.mpc
+++ /dev/null
@@ -1,16 +0,0 @@
-project(*Agent) : portableserver, ciao_lib {
-
- after += FTCommonIdl
- macros += SSA_EXPORT_BUILD_DLL
- libs += FTCommonIdl
- includes += ../CommonIDL
-
- IDL_Files {
- }
-
- Source_Files {
- StatefulObject.cpp
- CorbaStateUpdate.cpp
- StateSynchronizationAgent_i.cpp
- }
-}
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.cpp b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.cpp
deleted file mode 100644
index 5c9b045786c..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file StateSynchronizationAgent_i.cpp
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#include "StateSynchronizationAgent_i.h"
-#include "CorbaStateUpdate.h"
-
-#ifdef FLARE_USES_DDS
-# include "DDSStateUpdate_T.h"
-# include "StateDcps_impl.h"
-#endif
-
-StateSynchronizationAgent_i::StateSynchronizationAgent_i (
- CORBA::ORB_ptr orb,
- const std::string & host_id,
- const std::string & process_id,
- bool use_corba)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- host_id_ (host_id),
- process_id_ (process_id),
-#ifdef FLARE_USES_DDS
- domain_id_ (0),
- domain_participant_ (DDS::DomainParticipant::_nil ()),
- publisher_ (DDS::Publisher::_nil ()),
- subscriber_ (DDS::Subscriber::_nil ()),
-#endif /* FLARE_USES_DDS */
- use_corba_ (use_corba)
-{
-#ifdef FLARE_USES_DDS
- if (!use_corba_)
- {
- if (!this->create_participant ())
- throw DDSFailure ("SSA could not create DDS participant\n");
-
- if (!this->create_publisher ())
- throw DDSFailure ("SSA could not create DDS publisher\n");
-
- if (!this->create_subscriber ())
- throw DDSFailure ("SSA could not create DDS subscriber\n");
- }
-#endif /* FLARE_USES_DDS */
-}
-
-StateSynchronizationAgent_i::~StateSynchronizationAgent_i ()
-{
-#ifdef FLARE_USES_DDS
- if (!use_corba_)
- {
- this->delete_subscriber ();
- this->delete_publisher ();
- this->delete_participant ();
- }
-#endif /* FLARE_USES_DDS */
-}
-
-void
-StateSynchronizationAgent_i::state_changed (const char * object_id)
-{
- std::cout << "SSA::state_changed (" << object_id
- << ") called." << std::endl;
-
- // get application reference
- ReplicatedApplication_var app;
-
- if (application_map_.find (ACE_CString (object_id),
- app) != 0)
- {
- ACE_DEBUG ((LM_ERROR,
- "(%P|%t) SSA::state_changed () "
- "could not find application for object id %s\n",
- object_id));
- return;
- }
-
- // get state from the application
- CORBA::Any_var state;
- try
- {
- state = app->get_state ();
- }
- catch (const CORBA::SystemException& ex)
- {
- ACE_DEBUG ((LM_ERROR,
- "(%P|%t) SSA::state_changed () "
- "exception whil calling the get_state method for application %s:\n"
- "%s",
- object_id, ex._info ().c_str ()));
- return;
- }
-
- // send state to each element in the replica_map_
- REPLICA_OBJECT_LIST replica_group;
- if (replica_map_.find (ACE_CString (object_id),
- replica_group) != 0)
- {
- ACE_DEBUG ((LM_ERROR,
- "(%P|%t) SSA::state_changed () "
- "could not find replicas for the application %s\n",
- object_id));
- return;
- }
-
- ReplicatedApplication_var replica;
- for (REPLICA_OBJECT_LIST::iterator it = replica_group.begin ();
- it != replica_group.end ();
- ++it)
- {
- try
- {
- // set the state on this replica
- (*it)->set_state (state.in ());
- }
- catch (const CORBA::SystemException& ex)
- {
- ACE_DEBUG ((LM_WARNING,
- "(%P|%t) SSA::state_changed () "
- "exception while contacting a server replica for %s.\n",
- object_id));
- }
- }
-}
-
-void
-StateSynchronizationAgent_i::update_rank_list (const RankList & rank_list)
-{
- if (use_corba_)
- {
- // protect operations on the map
- ACE_Guard <ACE_Thread_Mutex> guard (replica_map_mutex_);
-
- // reset content of the internal map
- replica_map_.close();
- replica_map_.open();
-
- std::cout << "SSA::update_rank_list with:"
- << std::endl;
-
- // for each replication group in the replica group list
- for (size_t i = 0; i < rank_list.length (); ++i)
- {
- std::cout << "\toid = "<< rank_list[i].object_id.in ()
- << " (" << rank_list.length () << " entries)"
- << std::endl;
-
- // use the application id as a key for the map
- ACE_CString oid (rank_list[i].object_id);
-
- // create a new list for every replication group
- REPLICA_OBJECT_LIST replica_object_list;
-
- // for each entry of a replica group
- for (size_t j = 0; j < rank_list[i].ior_list.length (); ++j)
- {
- try
- {
- // it is assumed that the strings identifying rank_list are
- // stringified object references and can be resolved
- // and used to contact the corresponding StateSynchronizationAgent
- replica_object_list.push_back (
- STATEFUL_OBJECT_PTR (
- new CorbaStateUpdate (
- ReplicatedApplication::_narrow (rank_list[i].ior_list[j]))));
- }
- catch (const CORBA::SystemException& ex)
- {
- ACE_DEBUG ((LM_WARNING,
- "(%P|%t) SSA::"
- "update_replica_groups could not resolve stringified "
- "object reference %s\n",
- rank_list[i].ior_list[j].in ()));
- }
- }
-
- // add one replication group to the map
- replica_map_.bind (oid, replica_object_list);
- }
- } // end if (use_corba_)
-}
-
-void
-StateSynchronizationAgent_i::register_application (const char * object_id,
- ReplicatedApplication_ptr app)
-{
- std::cout << "SSA::register_application (" << object_id << ") called." << std::endl;
-
- ACE_CString oid (object_id);
-
- if (application_map_.bind (oid, ReplicatedApplication::_duplicate (app)) < 0)
- {
- ACE_DEBUG ((LM_WARNING,
- "(%P|%t) SSA::register_application () "
- "could not bind application %s to the map successfully\n",
- object_id));
- }
-
-#ifdef FLARE_USES_DDS
-
- // if we use DDS for communication
- if (!use_corba_)
- {
- try
- {
- // protect operations on the map
- ACE_Guard <ACE_Thread_Mutex> guard (replica_map_mutex_);
-
- ACE_DEBUG ((LM_TRACE, "SSA::register_application add DDS participant"
- " for application %s\n", object_id));
-
- // create a new list which will have only one entry for DDS
- REPLICA_OBJECT_LIST replica_object_list;
-
- // register a DDS participant for this application
- replica_object_list.push_back (
- STATEFUL_OBJECT_PTR (
- new DDSStateUpdate_T <CORBA::Long,
- State,
- StateTypeSupport,
- StateDataWriter,
- StateDataReader,
- StateSeq> (
- oid.c_str (),
- this->get_unique_id (oid.c_str ()),
- domain_participant_.in (),
- publisher_.in (),
- subscriber_.in (),
- app)));
-
- ACE_CString oid (object_id);
-
- // this should work without doing a rebind, since there is only
- // one application of the same type per process
- replica_map_.bind (oid, replica_object_list);
- }
- catch (const DDSFailure & ex)
- {
- std::cerr << "SSA::register_application () DDS problem : "
- << ex.description ()
- << std::endl;
- }
- }
-
-#endif /* FLARE_USES_DDS */
-}
-
-#ifdef FLARE_USES_DDS
-
-bool
-StateSynchronizationAgent_i::create_participant ()
-{
- DDS::DomainParticipantFactory_var dpf
- = DDS::DomainParticipantFactory::get_instance ();
-
- if (CORBA::is_nil (dpf.in ()))
- {
- return false;
- }
-
- domain_participant_ =
- dpf->create_participant (domain_id_,
- PARTICIPANT_QOS_DEFAULT,
- DDS::DomainParticipantListener::_nil (),
- DDS::ANY_STATUS);
-
- if (CORBA::is_nil (domain_participant_.in ()))
- {
- return false;
- }
-
- return true;
-}
-
-bool
-StateSynchronizationAgent_i::delete_participant ()
-{
- DDS::DomainParticipantFactory_var dpf
- = DDS::DomainParticipantFactory::get_instance ();
-
- if (CORBA::is_nil (dpf.in ()))
- {
- return false;
- }
-
- DDS::ReturnCode_t status =
- dpf->delete_participant (domain_participant_.in ());
-
- if (status != DDS::RETCODE_OK)
- {
- return false;
- }
-
- return true;
-}
-
-bool
-StateSynchronizationAgent_i::create_publisher ()
-{
- DDS::PublisherQos pub_qos;
- domain_participant_->get_default_publisher_qos (pub_qos);
-
- publisher_ =
- domain_participant_->create_publisher (pub_qos,
- DDS::PublisherListener::_nil (),
- DDS::ANY_STATUS);
-
- if (CORBA::is_nil (publisher_.in ()))
- {
- return false;
- }
-
- return true;
-}
-
-bool
-StateSynchronizationAgent_i::delete_publisher ()
-{
- DDS::ReturnCode_t status =
- domain_participant_->delete_publisher (publisher_.in ());
-
- if (status != DDS::RETCODE_OK)
- {
- return false;
- }
-
- return true;
-}
-
-bool
-StateSynchronizationAgent_i::create_subscriber ()
-{
- subscriber_ =
- domain_participant_->create_subscriber (SUBSCRIBER_QOS_DEFAULT,
- DDS::SubscriberListener::_nil (),
- DDS::ANY_STATUS);
-
- if (CORBA::is_nil (subscriber_.in ()))
- {
- return false;
- }
-
- return true;
-}
-
-bool
-StateSynchronizationAgent_i::delete_subscriber ()
-{
- DDS::ReturnCode_t status =
- domain_participant_->delete_subscriber (subscriber_.in ());
-
- if (status != DDS::RETCODE_OK)
- {
- return false;
- }
-
- return true;
-}
-
-#endif /* FLARE_USES_DDS */
-
-std::string
-StateSynchronizationAgent_i::get_unique_id (const std::string & app_name)
-{
- std::string unique_id (app_name);
-
- // make name unique by adding host and process id
- unique_id += "_" + host_id_ + "_" + process_id_;
-
- return unique_id;
-}
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.h b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.h
deleted file mode 100644
index 69c6900971a..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StateSynchronizationAgent_i.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file StateSynchronizationAgent_i.h
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _REPLICATION_AGENT_I_H_
-#define _REPLICATION_AGENT_I_H_
-#include <list>
-#include "ace/Hash_Map_Manager_T.h"
-#include "ace/Thread_Mutex.h"
-#include "ace/Refcounted_Auto_Ptr.h"
-#include "StateSynchronizationAgentS.h"
-#include "StatefulObject.h"
-#include "ssa_export.h"
-
-#if defined (FLARE_USES_DDS)
-# include <ccpp_dds_dcps.h>
-# include "DDSFailure.h"
-#endif
-
-class SSA_Export StateSynchronizationAgent_i : public POA_StateSynchronizationAgent
-{
- public:
- /// ctor
- /// @param reference to a simple long value representing
- /// the state of the application
- StateSynchronizationAgent_i (CORBA::ORB_ptr orb,
- const std::string & host_id,
- const std::string & process_id,
- bool use_corba = true);
-
- /// dtor
- ~StateSynchronizationAgent_i ();
-
- /// implementation of the StateSynchronizationAgent interface
- virtual void state_changed (const char * object_id);
-
- /// implementation of the StateSynchronizationAgent interface
- virtual void update_rank_list (const RankList & rank_list);
-
- /// implementation of the StateSynchronizationAgent interface
- virtual void register_application (const char * object_id,
- ReplicatedApplication_ptr app);
-
- typedef ACE_Refcounted_Auto_Ptr <StatefulObject,
- ACE_Null_Mutex> STATEFUL_OBJECT_PTR;
-
- typedef std::list<STATEFUL_OBJECT_PTR> REPLICA_OBJECT_LIST;
-
- typedef ACE_Hash_Map_Manager_Ex<
- ACE_CString,
- REPLICA_OBJECT_LIST,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> OBJECTID_REPLICA_MAP;
-
- typedef ACE_Hash_Map_Manager_Ex<
- ACE_CString,
- ReplicatedApplication_var,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> OBJECTID_APPLICATION_MAP;
-
- private:
-
-#ifdef FLARE_USES_DDS
-
- bool create_participant ();
- bool delete_participant ();
- bool create_publisher ();
- bool delete_publisher ();
- bool create_subscriber ();
- bool delete_subscriber ();
-
-#endif /* FLARE_USES_DDS */
-
- std::string get_unique_id (const std::string & app_name);
-
- private:
- /// orb reference
- CORBA::ORB_var orb_;
-
- /// host on which the agent is running
- std::string host_id_;
-
- /// process in which the agent is running
- std::string process_id_;
-
- /// keeps lists of replicas associated to application ids
- OBJECTID_REPLICA_MAP replica_map_;
-
- /// keeps references to all applications running in this process
- OBJECTID_APPLICATION_MAP application_map_;
-
- /// mutex for multithreaded access of the replica map
- ACE_Thread_Mutex replica_map_mutex_;
-
-#ifdef FLARE_USES_DDS
-
- /// id of the DDS domain
- DDS::DomainId_t domain_id_;
-
- /// DDS Domain Participant
- DDS::DomainParticipant_var domain_participant_;
-
- /// DDS Publisher for this Domain
- DDS::Publisher_var publisher_;
-
- /// DDS Subscriber for this Domain
- DDS::Subscriber_var subscriber_;
-
-#endif /* FLARE_USES_DDS */
-
- /// decides whether replicas should be updated through corba or dds
- bool use_corba_;
-};
-
-#endif /* _REPLICATED_APPLICATION_H_ */
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.cpp b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.cpp
deleted file mode 100644
index 0b8bdfcedbc..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file StatefulObject.cpp
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#include "StatefulObject.h"
-
-StatefulObject::StatefulObject()
-{
-}
-
-StatefulObject::~StatefulObject()
-{
-}
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.h b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.h
deleted file mode 100644
index 40e63f5e675..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/StatefulObject.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file StatefulObject.h
- *
- * $Id$
- *
- * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
- */
-//=============================================================================
-
-#ifndef _STATEFUL_OBJECT_H_
-#define _STATEFUL_OBJECT_H_
-
-// forward declaration
-namespace CORBA {
- class Any;
-};
-
-/**
- * @class StatefulObject
- *
- * @brief Abstract Base class for objects that have a set_state method.
- *
- * This class shields differences in how to disseminate state throughout
- * the system (e.g. either by standard CORBA calls, AMI or DDS) from
- * the state synchronization agent
- */
-class StatefulObject
-{
-public:
-
- /// ctor
- StatefulObject ();
-
- /// dtor
- virtual ~StatefulObject ();
-
- /// method to set the
- virtual void set_state (const ::CORBA::Any & state_value) = 0;
-};
-
-#endif /* _STATEFUL_OBJECT_H_ */
diff --git a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/ssa_export.h b/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/ssa_export.h
deleted file mode 100644
index 9ba172e9162..00000000000
--- a/CIAO/ciao/FTComponentServer/StateSynchronizationAgent/ssa_export.h
+++ /dev/null
@@ -1,116 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl SSA_Export
-// ------------------------------
-#ifndef SSA_EXPORT_EXPORT_H
-#define SSA_EXPORT_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (SSA_EXPORT_HAS_DLL)
-# define SSA_EXPORT_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && SSA_EXPORT_HAS_DLL */
-
-#if !defined (SSA_EXPORT_HAS_DLL)
-# define SSA_EXPORT_HAS_DLL 1
-#endif /* ! SSA_EXPORT_HAS_DLL */
-
-#if defined (SSA_EXPORT_HAS_DLL) && (SSA_EXPORT_HAS_DLL == 1)
-# if defined (SSA_EXPORT_BUILD_DLL)
-# define SSA_Export_Export ACE_Proper_Export_Flag
-# define SSA_EXPORT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define SSA_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* SSA_EXPORT_BUILD_DLL */
-# define SSA_Export_Export ACE_Proper_Import_Flag
-# define SSA_EXPORT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define SSA_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* SSA_EXPORT_BUILD_DLL */
-#else /* SSA_EXPORT_HAS_DLL == 1 */
-# define SSA_Export_Export
-# define SSA_EXPORT_SINGLETON_DECLARATION(T)
-# define SSA_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* SSA_EXPORT_HAS_DLL == 1 */
-
-// Set SSA_EXPORT_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (SSA_EXPORT_NTRACE)
-# if (ACE_NTRACE == 1)
-# define SSA_EXPORT_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define SSA_EXPORT_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !SSA_EXPORT_NTRACE */
-
-#if (SSA_EXPORT_NTRACE == 1)
-# define SSA_EXPORT_TRACE(X)
-#else /* (SSA_EXPORT_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define SSA_EXPORT_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (SSA_EXPORT_NTRACE == 1) */
-
-#endif /* SSA_EXPORT_EXPORT_H */
-
-// End of auto generated file.
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl SSA
-// ------------------------------
-#ifndef SSA_EXPORT_H
-#define SSA_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (SSA_HAS_DLL)
-# define SSA_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && SSA_HAS_DLL */
-
-#if !defined (SSA_HAS_DLL)
-# define SSA_HAS_DLL 1
-#endif /* ! SSA_HAS_DLL */
-
-#if defined (SSA_HAS_DLL) && (SSA_HAS_DLL == 1)
-# if defined (SSA_BUILD_DLL)
-# define SSA_Export ACE_Proper_Export_Flag
-# define SSA_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define SSA_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* SSA_BUILD_DLL */
-# define SSA_Export ACE_Proper_Import_Flag
-# define SSA_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define SSA_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* SSA_BUILD_DLL */
-#else /* SSA_HAS_DLL == 1 */
-# define SSA_Export
-# define SSA_SINGLETON_DECLARATION(T)
-# define SSA_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* SSA_HAS_DLL == 1 */
-
-// Set SSA_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (SSA_NTRACE)
-# if (ACE_NTRACE == 1)
-# define SSA_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define SSA_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !SSA_NTRACE */
-
-#if (SSA_NTRACE == 1)
-# define SSA_TRACE(X)
-#else /* (SSA_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define SSA_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (SSA_NTRACE == 1) */
-
-#endif /* SSA_EXPORT_H */
-
-// End of auto generated file.