From 0d087b955e72525ee864378444761f8bc4ddc2e7 Mon Sep 17 00:00:00 2001 From: parsons Date: Wed, 28 May 2008 17:29:04 +0000 Subject: ChangeLogTag: Wed May 28 17:27:57 UTC 2008 Jeff Parsons --- TAO/ChangeLog | 26 +++ .../examples/FaultTolerance/FLARe/Agent.cpp | 30 +-- TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.h | 30 +-- .../examples/FaultTolerance/FLARe/AppOptions.h | 2 +- .../examples/FaultTolerance/FLARe/AppSideReg.h | 2 +- .../examples/FaultTolerance/FLARe/ArgPair.h | 4 +- TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.idl | 10 +- TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc | 70 +++---- .../FaultTolerance/FLARe/ReplicationManager.cpp | 116 +++++------ .../FaultTolerance/FLARe/ReplicationManager.h | 231 +-------------------- .../FLARe/ReplicationManager_process.cpp | 45 ++-- .../FaultTolerance/FLARe/ServerORBInitializer.h | 8 +- TAO/orbsvcs/examples/FaultTolerance/FLARe/Timer.h | 4 +- .../examples/FaultTolerance/FLARe/client.cpp | 37 ++-- .../examples/FaultTolerance/FLARe/lwft_export.h | 40 ++++ .../examples/FaultTolerance/FLARe/server-1.cpp | 4 +- .../examples/FaultTolerance/FLARe/server-2.cpp | 9 +- 17 files changed, 228 insertions(+), 440 deletions(-) create mode 100644 TAO/orbsvcs/examples/FaultTolerance/FLARe/lwft_export.h diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 36399b0d383..50d2959ccaa 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,29 @@ +Wed May 28 17:27:57 UTC 2008 Jeff Parsons + + * orbsvcs/examples/FaultTolerance/FLARe/lwft_export.h: + + New file, export header file for new library of common + FLARe files. + + * orbsvcs/examples/FaultTolerance/FLARe/Agent.cpp: + * orbsvcs/examples/FaultTolerance/FLARe/server-1.cpp: + * orbsvcs/examples/FaultTolerance/FLARe/server-2.cpp: + * orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.h: + * orbsvcs/examples/FaultTolerance/FLARe/AppSideReg.h: + * orbsvcs/examples/FaultTolerance/FLARe/LWFT.idl + * orbsvcs/examples/FaultTolerance/FLARe/Agent.h: + * orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc: + * orbsvcs/examples/FaultTolerance/FLARe/client.cpp: + * orbsvcs/examples/FaultTolerance/FLARe/ServerORBInitializer.h: + * orbsvcs/examples/FaultTolerance/FLARe/Timer.h: + * orbsvcs/examples/FaultTolerance/FLARe/ArgPair.h: + * orbsvcs/examples/FaultTolerance/FLARe/AppOptions.h: + * orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager_process.cpp: + * orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.cpp: + + Combined generated code and other files used by multiple + builds into a new library called FLARE_Common. + Tue May 27 20:22:47 UTC 2008 Jeff Parsons * orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc: diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.cpp index 2c5efeec6cc..65cdfcbaee7 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.cpp +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.cpp @@ -21,9 +21,7 @@ void Agent_i::proactive(bool v) } CORBA::Object_ptr -Agent_i::next_member (const char *ior_string - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +Agent_i::next_member (const char *ior_string) { ACE_DEBUG ((LM_DEBUG, "NEXT MEMBER CALLED for ior_string = %s.\n",ior_string)); //sleep (3); @@ -85,9 +83,7 @@ Agent_i::next_member (const char *ior_string } void Agent_i:: -update_rank_list (const RankList & rank_list - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +update_rank_list (const RankList & rank_list) { /* if (update_count_ > 80) { @@ -129,7 +125,7 @@ initialize (CORBA::Object_ptr rm_ior) /* CORBA::String_var ior_string = - this->orb_->object_to_string (temp.in () ACE_ENV_ARG_PARAMETER); + this->orb_->object_to_string (temp.in ()); FILE *output_file= ACE_OS::fopen (ior_file, "w"); if (output_file == 0) @@ -149,17 +145,13 @@ initialize (CORBA::Object_ptr rm_ior) /* void -Agent_i::update_reference (const char *ior_string - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +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_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +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 (); @@ -173,9 +165,7 @@ Agent_i::update_failover_list (const FailoverList &failover_list void Agent_i::update_failover (const char * object_id, - CORBA::Object_ptr next_member - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) + CORBA::Object_ptr next_member) { ACE_DEBUG ((LM_DEBUG, "calling update next member\n")); this->failover_map_.rebind (object_id, @@ -184,9 +174,7 @@ Agent_i::update_failover (const char * object_id, void Agent_i::update_secondary (const char * object_id, - CORBA::Object_ptr next_member - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) + CORBA::Object_ptr next_member) { ACE_DEBUG ((LM_DEBUG, "calling update next members\n")); this->secondary_map_.rebind (object_id, @@ -195,9 +183,7 @@ Agent_i::update_secondary (const char * object_id, void Agent_i::initialize_agent (const ReplicaList & replica_list, - const ReplicasList & replicas_list - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) + const ReplicasList & replicas_list) { ACE_DEBUG ((LM_DEBUG, "calling initialize agent\n")); diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.h index 8cd120eb2e5..e9811d425ea 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/Agent.h @@ -23,42 +23,28 @@ public: ~Agent_i (void); - virtual CORBA::Object_ptr next_member (const char * m - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual CORBA::Object_ptr next_member (const char * m); - virtual void update_rank_list (const RankList & rank_list - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual void update_rank_list (const RankList & rank_list); void initialize (CORBA::Object_ptr); - void proactive(bool v); + void proactive (bool v); /* - virtual void update_reference (const char * m - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual void update_reference (const char * m); virtual void update_failover (const char * object_id, - CORBA::Object_ptr next_object - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + CORBA::Object_ptr next_object); virtual void update_secondary (const char * object_id, - CORBA::Object_ptr next_member - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + CORBA::Object_ptr next_member); virtual void initialize_agent (const ReplicaList & replica_list, - const ReplicasList & replicas_list - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + const ReplicasList & replicas_list)); - virtual void update_failover_list (const FailoverList &failover_list - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual void update_failover_list (const FailoverList &failover_list); typedef ACE_Hash_Map_Manager_Ex< ACE_CString, diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppOptions.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppOptions.h index aa89b3a278b..f86509f93ce 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppOptions.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppOptions.h @@ -21,7 +21,7 @@ * @brief Declares AppOptions singleton to hold the command line options. */ -class AppOptions +class TAO_LWFT_Export AppOptions /// TITLE /// Singleton class for the program options. { diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppSideReg.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppSideReg.h index 98ff84e2db8..f2a8c318fac 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppSideReg.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/AppSideReg.h @@ -23,7 +23,7 @@ class ACE_Barrier; -class AppSideReg : public ACE_Task_Base +class TAO_LWFT_Export AppSideReg : public ACE_Task_Base { public: AppSideReg(ACE_Barrier *ext_b, CORBA::ORB_ptr); diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ArgPair.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ArgPair.h index 3f04c9944af..606e5cbc99a 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ArgPair.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ArgPair.h @@ -1,7 +1,9 @@ #ifndef _ARGPAIR_H #define _ARGPAIR_H -struct ArgPair +#include "lwft_export.h" + +struct TAO_LWFT_Export ArgPair { ArgPair (int argc, char **argv); ~ArgPair (void); diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.idl b/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.idl index db4aa11430d..2970631bd9f 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.idl +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.idl @@ -2,6 +2,8 @@ // $Id$ // +#include "tao/StringSeq.pidl" + interface Hello { /// Return a simple string @@ -42,10 +44,10 @@ struct Replicas { typedef sequence ReplicasList; -typedef sequence PrimaryList; -typedef sequence FailoverList; -typedef sequence SecondaryList; -typedef sequence HostList; +typedef CORBA::StringSeq PrimaryList; +typedef CORBA::StringSeq FailoverList; +typedef CORBA::StringSeq SecondaryList; +typedef CORBA::StringSeq HostList; struct UtilMap { string host_id; diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc b/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc index 27c3ed7432f..996b0e48707 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/LWFT.mpc @@ -2,6 +2,8 @@ // $Id$ project(*idl): taoidldefaults { + idlflags += -Wb,export_macro=TAO_LWFT_Export -Wb,export_include=lwft_export.h + IDL_Files { LWFT.idl monitor.idl @@ -15,9 +17,10 @@ project(*idl): taoidldefaults { custom_only = 1 } -project(*server2): rt_server, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors, naming, iorinterceptor { +project(*Common) : rtportableserver, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors, iorinterceptor { after += *idl - exename = server-2 + sharedname = LWFT_Common + dynamicflags = TAO_LWFT_BUILD_DLL IDL_Files { } @@ -36,39 +39,46 @@ project(*server2): rt_server, avoids_minimum_corba, avoids_corba_e_compact, avoi monitorS.cpp ObjectReferenceFactory.cpp ObjectReferenceFactoryC.cpp - server-2.cpp ServerORBInitializer.cpp + Timer.cpp } } -project(*server1): rt_server, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors, naming, iorinterceptor { - after += *idl +project(*server2): rt_server, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors, iorinterceptor { + after += *Common + libs += LWFT_Common + exename = server-2 + + IDL_Files { + } + + Source_Files { + server-2.cpp + } + + Header_Files { + } +} + +project(*server1): rt_server, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors, iorinterceptor { + after += *Common + libs += LWFT_Common exename = server-1 IDL_Files { } Source_Files { - AppOptions.cpp - ArgPair.cpp - AppSideMonitor_Thread.cpp - AppSideMonitor_Handler.cpp - AppSideReg.cpp - Hello.cpp - IOR_Interceptor.cpp - LWFTC.cpp - LWFTS.cpp - monitorC.cpp - monitorS.cpp - ObjectReferenceFactory.cpp - ObjectReferenceFactoryC.cpp server-1.cpp - ServerORBInitializer.cpp + } + + Header_Files { } } -project(*client): rt_client, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors, naming { - after += *idl +project(*client): rt_client, avoids_minimum_corba, avoids_corba_e_compact, avoids_corba_e_micro, pi_server, interceptors { + after += *Common + libs += LWFT_Common exename = client IDL_Files { @@ -79,51 +89,41 @@ project(*client): rt_client, avoids_minimum_corba, avoids_corba_e_compact, avoid client.cpp Client_ORBInitializer.cpp Client_Request_Interceptor.cpp - LWFTC.cpp - LWFTS.cpp } } project(*HostMonitor): taoserver, naming { - after += *idl + after += *Common + libs += LWFT_Common exename = host_monitor IDL_Files { } Source_Files { - ArgPair.cpp Failure_Handler.cpp HMOptions.cpp host_monitor.cpp HostMonitorImpl.cpp LinuxCPULoadCalculator.cpp - LWFTC.cpp - LWFTS.cpp Monitor_Thread.cpp - monitorC.cpp - monitorS.cpp RM_Proxy.cpp - Timer.cpp Utilization_Monitor.cpp } } project(*ReplicationManager): taoserver, naming { - after += *idl + after += *Common + libs += LWFT_Common exename = ReplicationManager IDL_Files { } Source_Files { - ArgPair.cpp - LWFTC.cpp - LWFTS.cpp ReplicationManager.cpp ReplicationManager_process.cpp RMOptions.cpp - Timer.cpp } } diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.cpp index 1eb1998732a..75a14cdb1a7 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.cpp +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.cpp @@ -150,12 +150,11 @@ register_application (const char *object_id, const char *host_id, const char *process_id, CORBA::Short role, - CORBA::Object_ptr server_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) + CORBA::Object_ptr server_reference) { ACE_Guard guard(update_mutex_); ACE_Time_Value wait_time (5); + while (update_list_.size() >= UPDATE_LIST_MAX_SIZE) { if(update_list_full_.wait(update_mutex_, &wait_time) == -1) // timeout @@ -165,6 +164,7 @@ register_application (const char *object_id, return; } } + update_list_.insert_tail ( MonitorUpdate::create_app_info_update(object_id, load, host_id, process_id, Role(role), server_reference)); @@ -365,6 +365,7 @@ elevate_backup_to_primary (ACE_CString const & tag) { RANKED_IOR_LIST ranked_ior_list; ACE_CString failover_host; + if(this->objectid_rankedior_map_.find(tag,ranked_ior_list) == 0) { failover_host = ranked_ior_list.host_list.front(); @@ -376,6 +377,7 @@ elevate_backup_to_primary (ACE_CString const & tag) } APP_SET app_set; ACE_Guard guard (this->appset_lock_); + if (this->objectid_appset_map_.find (tag,app_set) == 0) { for(APP_SET::iterator as_iter = app_set.begin(); @@ -384,11 +386,13 @@ elevate_backup_to_primary (ACE_CString const & tag) if ((*as_iter).host_name == failover_host.c_str()) { STRING_LIST backup_tag_list; + if (this->processid_backup_map_.find((*as_iter).process_id, backup_tag_list) == 0) { backup_tag_list.remove(tag); this->processid_backup_map_.rebind((*as_iter).process_id, backup_tag_list); STRING_LIST primary_tag_list; + if(this->processid_primary_map_.find( (*as_iter).process_id, primary_tag_list) == 0) { @@ -407,6 +411,7 @@ elevate_backup_to_primary (ACE_CString const & tag) "Data structure invariant broken\n", tag.c_str(),(*as_iter).process_id.c_str())); } + (*as_iter).role = PRIMARY; this->objectid_appset_map_.rebind(tag, app_set); break; @@ -439,6 +444,7 @@ replica_selection_algo () { ACE_DLList update_list; move_update_list(this->update_list_, update_list); + if (process_updates(update_list) == true) { objectid_rankedior_map_.close(); @@ -450,6 +456,7 @@ replica_selection_algo () STRING_TO_DOUBLE_MAP processor_level_host_util_map;; copy_map (this->hostid_util_map_, processor_level_host_util_map); STRING_LIST & process_list = (*hp_iter).item(); + for (STRING_LIST::iterator pl_iter = process_list.begin (); pl_iter != process_list.end (); ++pl_iter) { @@ -459,12 +466,14 @@ replica_selection_algo () (this->mode_ == PROCESS_LEVEL)? process_level_host_util_map : processor_level_host_util_map; STRING_LIST primary_object_list; + if (processid_primary_map_.find (*pl_iter, primary_object_list) == 0) // If present { for (STRING_LIST::iterator po_iter = primary_object_list.begin (); po_iter != primary_object_list.end (); ++po_iter) { STRING_LIST host_list = non_primary_host_list(*po_iter); + if (host_list.size() >= 1) // if the object has backups. { std::priority_queue util_ranked_queue = @@ -478,6 +487,7 @@ replica_selection_algo () } } } + build_rank_list (); } send_rank_list(); @@ -676,7 +686,7 @@ send_rank_list() for (AGENT_LIST::iterator al_iter = agent_list_.begin(); al_iter != agent_list_.end(); ++ al_iter) { - Agent_var agent = Agent::_narrow (*al_iter ACE_ENV_ARG_PARAMETER); + Agent_var agent = Agent::_narrow (*al_iter); try { agent->update_rank_list(this->rank_list_); @@ -733,12 +743,11 @@ void ReplicationManager_i::update_ior_map ( } void ReplicationManager_i:: -proc_failure (const char *process_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +proc_failure (const char *process_id) { ACE_Guard guard(update_mutex_); ACE_Time_Value wait_time (5); + while (update_list_.size() >= UPDATE_LIST_MAX_SIZE) { if(update_list_full_.wait(update_mutex_, &wait_time) == -1) // timeout @@ -754,13 +763,12 @@ proc_failure (const char *process_id void ReplicationManager_i:: util_update (const char *host_id, - double util - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) + double util) { //ACE_DEBUG ((LM_DEBUG, "Update from %s with UTIL %d\n", host_id, (int)util)); ACE_Guard guard(update_mutex_); ACE_Time_Value wait_time (5); + while (update_list_.size() >= UPDATE_LIST_MAX_SIZE) { if(update_list_full_.wait(update_mutex_, &wait_time) == -1) // timeout @@ -796,14 +804,10 @@ ReplicationManager_i::pulse (void) } RankList * ReplicationManager_i:: -register_agent (CORBA::Object_ptr agent_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +register_agent (CORBA::Object_ptr agent_reference) { ACE_DEBUG ((LM_DEBUG, "register_agent called\n")); - Agent_var agent = Agent::_narrow (agent_reference - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + Agent_var agent = Agent::_narrow (agent_reference); ACE_Guard guard (rank_list_agent_list_combined_mutex_); this->agent_list_.insert_tail (CORBA::Object::_duplicate (agent.in ())); @@ -811,15 +815,14 @@ register_agent (CORBA::Object_ptr agent_reference } CORBA::Object_ptr ReplicationManager_i:: -get_next (const char * object_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +get_next (const char * object_id) { /* if (proactive_) ACE_DEBUG((LM_DEBUG,"Replication Manager is in proactive mode.\n")); ACE_Guard guard (this->appset_lock_); APP_SET app_set; + if (this->objectid_appset_map_.find (object_id,app_set) == 0) { for (APP_SET::iterator as_iter = app_set.begin(); @@ -937,23 +940,17 @@ ReplicationManager_i::~ReplicationManager_i (void) { } -CORBA::Long ReplicationManager_i::next_member (const char * object_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +CORBA::Long ReplicationManager_i::next_member (const char * object_id) { ACE_DEBUG ((LM_DEBUG, "register_agent called\n")); return 0; } void -ReplicationManager_i::register_agent (CORBA::Object_ptr agent_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +ReplicationManager_i::register_agent (CORBA::Object_ptr agent_reference) { ACE_DEBUG ((LM_DEBUG, "register_agent called\n")); - Agent_var agent = Agent::_narrow (agent_reference - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + Agent_var agent = Agent::_narrow (agent_reference); this->agent_list_.insert_tail (CORBA::Object::_duplicate (agent.in ())); agent->initialize_agent (this->replica_list_, this->replicas_list_); @@ -1171,9 +1168,7 @@ ReplicationManager_i::register_application (const char *object_id, const char *host_id, const char *process_id, CORBA::Short role, - CORBA::Object_ptr server_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) + CORBA::Object_ptr server_reference) { ACE_DEBUG ((LM_DEBUG, "register application called process_id = %s, \ object_id = %s, role = %d\n", process_id, object_id, role)); @@ -1227,12 +1222,11 @@ ReplicationManager_i::update_host_list (const char *object_id, } void -ReplicationManager_i::util_update (const char *host_id, double util - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +ReplicationManager_i::util_update (const char *host_id, double util) { //ACE_DEBUG ((LM_DEBUG, "Update from %s with UTIL %l\n", host_id, util)); double current_util; + if (this->host_util_map_.find (host_id, current_util) == 0) { this->host_util_map_.rebind (host_id, util); @@ -1244,9 +1238,7 @@ ReplicationManager_i::util_update (const char *host_id, double util } void -ReplicationManager_i::proc_failure (const char *process_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) +ReplicationManager_i::proc_failure (const char *process_id) { ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); @@ -1257,36 +1249,38 @@ ReplicationManager_i::proc_failure (const char *process_id ACE_CString process_name = CORBA::string_dup (process_id); FAILOVER_LIST failover_list; + if (this->failover_map_.find (process_name, failover_list) == 0) { - ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); + ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); - FailoverList fail_list; - fail_list.length (0); - CORBA::ULong fail_list_length; + FailoverList fail_list; + fail_list.length (0); + CORBA::ULong fail_list_length; - for (FAILOVER_LIST::iterator iter = failover_list.begin (); - iter != failover_list.end (); ++iter) - { - ACE_CString object_id = *iter; - char *object_name = CORBA::string_dup (object_id.c_str ()); - fail_list_length = fail_list.length (); - fail_list.length (fail_list_length + 1); - fail_list[fail_list_length] = object_name; - } - ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); + for (FAILOVER_LIST::iterator iter = failover_list.begin (); + iter != failover_list.end (); ++iter) + { + ACE_CString object_id = *iter; + char *object_name = CORBA::string_dup (object_id.c_str ()); + fail_list_length = fail_list.length (); + fail_list.length (fail_list_length + 1); + fail_list[fail_list_length] = object_name; + } + + ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); - for (AGENT_LIST::iterator it = this->agent_list_.begin (); - it != this->agent_list_.end (); ++it) - { - CORBA::Object_var agent_ref = *it; - Agent_var agent = Agent::_narrow (agent_ref - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - agent->update_failover_list (fail_list); + for (AGENT_LIST::iterator it = this->agent_list_.begin (); + it != this->agent_list_.end (); ++it) + { + CORBA::Object_var agent_ref = *it; + Agent_var agent = Agent::_narrow (agent_ref); + agent->update_failover_list (fail_list); + } + + ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); } - ACE_DEBUG ((LM_DEBUG, "Update from Monitor that %s failed\n", process_id)); - } + ACE_DEBUG ((LM_DEBUG, "END Update from Monitor that %s failed\n", process_id)); } diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.h index b61659ae65a..c0bb70ee262 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager.h @@ -99,26 +99,16 @@ public: const char *host_name, const char *process_id, CORBA::Short role, - CORBA::Object_ptr server_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + CORBA::Object_ptr server_reference); void util_update (const char *host_id, - double util - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + double util); - virtual void proc_failure (const char *process_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual void proc_failure (const char *process_id); - virtual RankList * register_agent (CORBA::Object_ptr agent_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual RankList * register_agent (CORBA::Object_ptr agent_reference); - virtual CORBA::Object_ptr get_next (const char * object_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); + virtual CORBA::Object_ptr get_next (const char * object_id); bool replica_selection_algo (); @@ -245,215 +235,4 @@ private: // RankList * rank_list_clone (); }; -/* -class ReplicationManager_i : public virtual POA_ReplicationManager, - protected Timer -{ -public: - - using Timer::start; - using Timer::stop; - using Timer::hertz; - - ReplicationManager_i (CORBA::ORB_ptr orb); - - ~ReplicationManager_i (void); - -// ************************************************************************* - - virtual void register_application (const char *object_id, - CORBA::Long load, - const char *host_name, - const char *process_id, - CORBA::Short role, - CORBA::Object_ptr server_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); - - virtual void register_agent (CORBA::Object_ptr agent_reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); - - virtual CORBA::Long next_member (const char * - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); - - virtual void util_update (const char *host_id, double utilization - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); - - virtual void proc_failure (const char *process_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); - - -// ************************************************************************* - - virtual int pulse (void); - - void update_replica_group_map (const char *object_id, - const char *host_name, - const char *process_id, - CORBA::Object_ptr server_reference); - - void update_replica_list (CORBA::Object_ptr server_reference, - const char *object_id); - - void update_replicas_list (CORBA::Object_ptr server_reference, - const char *object_id); - - void update_primary_map (const char *process_id, const char *object_id); - - void update_failover_map (const char *process_id, const char *object_id); - - void update_secondary_map (const char *process_id, const char *object_id); - - void update_host_list (const char *object_id, const char *host_id); - - void update_object_primary_map (const char *process_id, - const char *host_id, - const char *object_id); - - void update_object_failover_map (const char *process_id, - const char *host_id, - const char *object_id); - - void update_object_secondary_map (const char *process_id, - const char *host_id, - const char *object_id); - -// *************************************************************************** - - typedef ACE_Unbounded_Set PRIMARY_LIST; - typedef ACE_Unbounded_Set FAILOVER_LIST; - typedef ACE_Unbounded_Set SECONDARY_LIST; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - PRIMARY_LIST, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> PRIMARY_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - FAILOVER_LIST, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> FAILOVER_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - SECONDARY_LIST, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> SECONDARY_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - ACE_CString, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> PROCESS_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - CORBA::Object_var, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> REF_MAP; - - typedef ACE_Unbounded_Set HOST_LIST; - - typedef ACE_Unbounded_Set AGENT_LIST; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - HOST_LIST, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> REPLICA_HOST_MAP; - - struct Replica_Group_Entry - { - PROCESS_MAP process_map; - REF_MAP ref_map; - HOST_LIST host_list; - }; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - Replica_Group_Entry *, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> REPLICA_GROUP_MAP; - - typedef ACE_Hash_Map_Iterator_Ex < - ACE_CString, - Replica_Group_Entry *, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> REPLICA_GROUP_MAP_ITERATOR; - - struct Object_Info - { - ACE_CString process_id; - ACE_CString host_id; - }; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - Object_Info, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> OBJECT_PRIMARY_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - Object_Info, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> OBJECT_FAILOVER_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - Object_Info, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> OBJECT_SECONDARY_MAP; - - typedef ACE_Hash_Map_Manager_Ex< - ACE_CString, - double, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> HOST_UTIL_MAP; - -private: - - CORBA::ORB_var orb_; - TAO_SYNCH_MUTEX lock_; - TAO_SYNCH_MUTEX primary_map_lock_; - TAO_SYNCH_MUTEX failover_map_lock_; - TAO_SYNCH_MUTEX secondary_map_lock_; - TAO_SYNCH_MUTEX replica_group_map_lock_; - TAO_SYNCH_MUTEX replica_host_map_lock_; - TAO_SYNCH_MUTEX object_primary_map_lock_; - TAO_SYNCH_MUTEX object_failover_map_lock_; - TAO_SYNCH_MUTEX object_secondary_map_lock_; - ReplicaList replica_list_; - ReplicasList replicas_list_; - PRIMARY_MAP primary_map_; - FAILOVER_MAP failover_map_; - SECONDARY_MAP secondary_map_; - REPLICA_GROUP_MAP replica_group_map_; - REPLICA_HOST_MAP replica_host_map_; - OBJECT_PRIMARY_MAP object_primary_map_; - OBJECT_FAILOVER_MAP object_failover_map_; - OBJECT_SECONDARY_MAP object_secondary_map_; - HOST_UTIL_MAP host_util_map_; - AGENT_LIST agent_list_; - -}; -*/ #endif /* REPLICATION_MANAGER_H */ diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager_process.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager_process.cpp index 69e530143ff..593c41d2386 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager_process.cpp +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ReplicationManager_process.cpp @@ -24,27 +24,20 @@ main (int argc, char *argv[]) } CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Client ORB" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + "Client ORB"); CORBA::Object_var object = - orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = - PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableServer::POA::_narrow (object.in ()); PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->the_POAManager (); + poa_manager->activate (); /* CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->resolve_initial_references ("NameService"); if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -52,17 +45,13 @@ main (int argc, char *argv[]) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - + CosNaming::NamingContext::_narrow (naming_obj.in ()); ReplicationManager_i rm_i (orb.in ()); // rm_i.hertz (5); // rm_i.start (); - ReplicationManager_var rm = rm_i._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ReplicationManager_var rm = rm_i._this (); */ ReplicationManager_i *rm_i = 0; @@ -85,18 +74,19 @@ main (int argc, char *argv[]) name[0].kind = CORBA::string_dup (""); // Register with the name server - naming_context->bind (name, rm.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + naming_context->bind (name, rm.in ()); */ CORBA::String_var ior = - orb->object_to_string (rm.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->object_to_string (rm.in ()); + ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); + if (ior_output_file != 0) { FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", @@ -106,16 +96,13 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); ACE_DEBUG ((LM_DEBUG, "(%P|%t) RM - event loop finished\n")); - poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + poa->destroy (1, 1); - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ServerORBInitializer.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ServerORBInitializer.h index bd8fb0e3805..012b7eef9e5 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/ServerORBInitializer.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/ServerORBInitializer.h @@ -12,14 +12,16 @@ #include "tao/PI/PI.h" #include "tao/LocalObject.h" +#include "lwft_export.h" + #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4250) #endif /* _MSC_VER */ -class ServerORBInitializer : - public virtual PortableInterceptor::ORBInitializer, - public virtual TAO_Local_RefCounted_Object +class TAO_LWFT_Export ServerORBInitializer + : public virtual PortableInterceptor::ORBInitializer, + public virtual TAO_Local_RefCounted_Object { public: diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/Timer.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/Timer.h index 51a6e015a61..db4f5a96ed3 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/Timer.h +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/Timer.h @@ -12,11 +12,13 @@ #include "ace/Task.h" +#include "lwft_export.h" + /** * @class Timer * */ -class Timer : public ACE_Task_Base +class TAO_LWFT_Export Timer : public ACE_Task_Base { public: /// Default constructor. diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/client.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/client.cpp index afc387d4d9f..1fb43277b5a 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/client.cpp +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/client.cpp @@ -88,9 +88,7 @@ Agent_Thread::svc (void) try { CORBA::Object_var poa_object = - this->orb_->resolve_initial_references ( - "RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->orb_->resolve_initial_references ("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -98,23 +96,18 @@ Agent_Thread::svc (void) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); /* Agent_var temp = - this->agent_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->agent_->_this (); CORBA::String_var ior = - this->orb_->object_to_string (temp.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->orb_->object_to_string (temp.in ()); */ - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); /* FILE *output_file= ACE_OS::fopen (agent_ior_file, "w"); if (output_file == 0) @@ -131,9 +124,7 @@ Agent_Thread::svc (void) */ /* CORBA::Object_var naming_obj = - this->orb_->resolve_initial_references ("NameService" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->orb_->resolve_initial_references ("NameService"); if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -141,27 +132,22 @@ Agent_Thread::svc (void) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CosNaming::NamingContext::_narrow (naming_obj.in ()); CosNaming::Name name (1); name.length (1); name[0].id = CORBA::string_dup ("ReplicationManager"); CORBA::Object_var rm_obj = - naming_context->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + naming_context->resolve (name); */ CORBA::Object_var tmp = this->orb_->string_to_object(rm_ior); ReplicationManager_var rm = - ReplicationManager::_narrow (tmp.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ReplicationManager::_narrow (tmp.in ()); - agent_->initialize(rm.in()); + agent_->initialize (rm.in ()); //ACE_DEBUG ((LM_DEBUG, "calling register agent\n")); @@ -174,6 +160,7 @@ Agent_Thread::svc (void) ex._tao_print_exception ("Exception caught:"); return 1; } + return 0; } diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/lwft_export.h b/TAO/orbsvcs/examples/FaultTolerance/FLARe/lwft_export.h new file mode 100644 index 00000000000..8558b8d2612 --- /dev/null +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/lwft_export.h @@ -0,0 +1,40 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl +// ------------------------------ +#ifndef TAO_LWFT_EXPORT_H +#define TAO_LWFT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (TAO_AS_STATIC_LIBS) +# if !defined (TAO_LWFT_HAS_DLL) +# define TAO_LWFT_HAS_DLL 0 +# endif /* ! TAO_LWFT_HAS_DLL */ +#else +# if !defined (TAO_LWFT_HAS_DLL) +# define TAO_LWFT_HAS_DLL 1 +# endif /* ! TAO_LWFT_HAS_DLL */ +#endif + +#if defined (TAO_LWFT_HAS_DLL) && (TAO_LWFT_HAS_DLL == 1) +# if defined (TAO_LWFT_BUILD_DLL) +# define TAO_LWFT_Export ACE_Proper_Export_Flag +# define TAO_LWFT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define TAO_LWFT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* TAO_LWFT_BUILD_DLL */ +# define TAO_LWFT_Export ACE_Proper_Import_Flag +# define TAO_LWFT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define TAO_LWFT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* TAO_LWFT_BUILD_DLL */ +#else /* TAO_LWFT_HAS_DLL == 1 */ +# define TAO_LWFT_Export +# define TAO_LWFT_SINGLETON_DECLARATION(T) +# define TAO_LWFT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* TAO_LWFT_HAS_DLL == 1 */ + +#endif /* TAO_LWFT_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-1.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-1.cpp index 263637757a3..a1c94174cce 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-1.cpp +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-1.cpp @@ -439,9 +439,7 @@ Task::svc (void) CORBA::Object_var tmp = this->orb_->string_to_object (rm_ior_file); ReplicationManager_var rm = - ReplicationManager::_narrow (tmp.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ReplicationManager::_narrow (tmp.in ()); // *************************************************** // first servant activated diff --git a/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-2.cpp b/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-2.cpp index 2a3fe1bee90..102a2d72db4 100644 --- a/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-2.cpp +++ b/TAO/orbsvcs/examples/FaultTolerance/FLARe/server-2.cpp @@ -23,12 +23,11 @@ #include #include -ACE_RCSID(Thread_Pools, server, "$Id$") +ACE_RCSID (FLARe, server, "$Id$") static int stop = 0; -class test_i : - public POA_test +class test_i : public POA_test { public: test_i (CORBA::ORB_ptr orb, @@ -434,9 +433,7 @@ Task::svc (void) CORBA::Object_var tmp = this->orb_->string_to_object (rm_ior_file); ReplicationManager_var rm = - ReplicationManager::_narrow (tmp.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ReplicationManager::_narrow (tmp.in ()); // *************************************************** // first servant activated -- cgit v1.2.1