diff options
16 files changed, 194 insertions, 195 deletions
diff --git a/flat/CIAO/ChangeLog b/flat/CIAO/ChangeLog index 380e2d7e629..76f4589ea73 100644 --- a/flat/CIAO/ChangeLog +++ b/flat/CIAO/ChangeLog @@ -1,3 +1,24 @@ +Mon Nov 17 15:03:23 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/ComponentServer/CIAO_ComponentServer.cpp + * ciao/ComponentServer/CIAO_ComponentServer.h + * ciao/ComponentServer/CIAO_ComponentServer_Impl.cpp + * ciao/ComponentServer/CIAO_Container_Impl.h + * ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp + * ciao/ComponentServer/CIAO_ServerActivator_Impl.h + * ciao/ComponentServer/CIAO_ServerResources.idl + * ciao/Containers/Container_Base.cpp + * ciao/Containers/Container_Base.h + * ciao/Containers/Servant_Activator.cpp + * ciao/Containers/Servant_Activator.h + * ciao/Containers/Session/Session_Container.cpp + * ciao/Containers/Session/Session_Container.h + Layout changes + + * ciao/ComponentServer/Configurator_Factory.cpp + * ciao/ComponentServer/Configurator_Factory.h + No need to have a member variable + Mon Nov 17 14:34:23 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> * ciao/Client_init.cpp diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.cpp b/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.cpp index 18eca73d467..2ae39ff1827 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.cpp +++ b/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.cpp @@ -60,7 +60,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR **argv) #endif /* CIAO_BUILD_COMPONENTSERVER_EXE */ bool -write_IOR (const char * ior_file_name, const char* ior) +write_IOR (const ACE_TCHAR * ior_file_name, const char* ior) { FILE* ior_output_file_ = ACE_OS::fopen (ior_file_name, "w"); @@ -162,7 +162,7 @@ namespace CIAO ComponentServer_var cs (ci_srv->_this ()); - if (this->output_file_ != "") + if (this->output_file_ != ACE_TEXT("")) { CORBA::String_var ior = this->orb_->object_to_string (cs.in ()); write_IOR (this->output_file_.c_str (), ior.in ()); @@ -184,7 +184,7 @@ namespace CIAO Components::ConfigValues_var config; { - Components::ConfigValues *cf; + Components::ConfigValues *cf = 0; ACE_NEW_NORETURN (cf, Components::ConfigValues (0)); if (cf == 0) @@ -192,7 +192,10 @@ namespace CIAO CIAO_ERROR ((LM_CRITICAL, "ComponentServer_Task::run - " "Out of memory error while allocating config values.")); } - else config = cf; + else + { + config = cf; + } } // Make callback. @@ -221,7 +224,7 @@ namespace CIAO sa->configuration_complete (this->uuid_.c_str ()); } - catch (CORBA::BAD_PARAM &) + catch (const CORBA::BAD_PARAM &) { CIAO_ERROR ((LM_ERROR, CLINFO "ComponentServer_Task::svc - " "The Callback IOR provided pointed to the wrong ServerActivator\n")); @@ -272,8 +275,7 @@ namespace CIAO this->orb_->orb_core ()->orb_params ()->thread_creation_flags (); // Activate task. - int result = - this->activate (flags); + int result = this->activate (flags); if (result == -1) { if (errno == EPERM) @@ -290,8 +292,7 @@ namespace CIAO } // Wait for task to exit. - result = - this->wait (); + result = this->wait (); if (result != -1) throw Error ("Unknown error waiting for ORB thread to complete"); @@ -316,12 +317,12 @@ namespace CIAO ACE_Get_Opt opts (argc, argv, ACE_TEXT("hu:c:"), 1, 0, ACE_Get_Opt::RETURN_IN_ORDER); - opts.long_option ("uuid", 'u', ACE_Get_Opt::ARG_REQUIRED); - opts.long_option ("callback-ior", 'c', ACE_Get_Opt::ARG_REQUIRED); - opts.long_option ("help", 'h'); - opts.long_option ("log-level",'l', ACE_Get_Opt::ARG_REQUIRED); - opts.long_option ("trace",'t', ACE_Get_Opt::NO_ARG); - opts.long_option ("output-ior",'o', ACE_Get_Opt::ARG_REQUIRED); + opts.long_option (ACE_TEXT("uuid"), 'u', ACE_Get_Opt::ARG_REQUIRED); + opts.long_option (ACE_TEXT("callback-ior"), 'c', ACE_Get_Opt::ARG_REQUIRED); + opts.long_option (ACE_TEXT("help"), 'h'); + opts.long_option (ACE_TEXT("log-level"),'l', ACE_Get_Opt::ARG_REQUIRED); + opts.long_option (ACE_TEXT("trace"),'t', ACE_Get_Opt::NO_ARG); + opts.long_option (ACE_TEXT("output-ior"),'o', ACE_Get_Opt::ARG_REQUIRED); //int j; char c; @@ -372,7 +373,7 @@ namespace CIAO CIAO_ERROR ((LM_ERROR, CLINFO " Unknown option: %s\n", opts.last_option ())); this->usage (); - ACE_CString err ("Unknown option "); + ACE_TString err (ACE_TEXT("Unknown option ")); err += opts.last_option (); throw Error (err); } @@ -434,10 +435,8 @@ namespace CIAO // Check that we have sufficient priority range to run, // i.e., more than 1 priority level. - int const max_priority = - ACE_Sched_Params::priority_max (sched_policy); - int const min_priority = - ACE_Sched_Params::priority_min (sched_policy); + int const max_priority = ACE_Sched_Params::priority_max (sched_policy); + int const min_priority = ACE_Sched_Params::priority_min (sched_policy); if (max_priority == min_priority) { diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.h b/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.h index b9171e83256..20828f7f078 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.h +++ b/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer.h @@ -1,7 +1,7 @@ /** * @file CIAO_ComponentServer.h * @author William R. Otte - * + * * Defines interface for the bootstrap element of the CIAO Component * Server. */ @@ -17,51 +17,50 @@ namespace CIAO { namespace Deployment - { + { class ComponentServer_Configurator; - + class ComponentServer_Task : ACE_Task_Base { public: ComponentServer_Task (int argc, ACE_TCHAR **argv); - + int svc (void); - + struct Error { Error (const ACE_CString &err) : err_(err) {} - + ACE_CString err_; }; - + void run (void); - + private: void parse_args (int argc, ACE_TCHAR **argv); - + void get_log_level (int argc, ACE_TCHAR **argv); - + void set_log_level (void); - + void configure_logging_backend (void); - + void usage (void); - + const char * sched_policy_name (int sched_policy); - + void check_supported_priorities (void); - - + CORBA::ORB_var orb_; - + auto_ptr<CIAO::Logger_Service> logger_; - + ACE_CString uuid_; ACE_CString callback_ior_str_; - ACE_CString output_file_; + ACE_TString output_file_; auto_ptr<ComponentServer_Configurator> configurator_; - + }; } } diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer_Impl.cpp b/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer_Impl.cpp index 4d9deb09e7c..f15df2f15f2 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer_Impl.cpp +++ b/flat/CIAO/ciao/ComponentServer/CIAO_ComponentServer_Impl.cpp @@ -14,7 +14,7 @@ namespace CIAO PortableServer::POA_ptr poa) : uuid_ (uuid), orb_ (CORBA::ORB::_duplicate (orb)), - poa_ (PortableServer::POA::_duplicate (poa)), + poa_ (PortableServer::POA::_duplicate (poa)), containers_ () { CIAO_TRACE("CIAO_ComponentServer_i::CIAO_ComponentServer_i"); @@ -26,7 +26,6 @@ namespace CIAO CIAO_TRACE("CIAO_ComponentServer_i::~CIAO_ComponentServer_i"); } - void CIAO_ComponentServer_i::shutdown (void) { @@ -58,7 +57,6 @@ namespace CIAO return this->serv_act_.in (); } - ::Components::Deployment::Container_ptr CIAO_ComponentServer_i::create_container (const ::Components::ConfigValues & config) { @@ -69,13 +67,13 @@ namespace CIAO CIAO_DEBUG ((LM_INFO, CLINFO "CIAO_ComponentServer_i::create_container - Request received with %u config values\n", config.length ())); - CORBA::PolicyList policies; - const char *name = 0; - + CORBA::PolicyList policies; + const char *name = 0; CIAO_Container_i *cont = 0; ACE_NEW_THROW_EX (cont, - CIAO_Container_i (config, 0, name, &policies, this->orb_.in (), this->poa_.in ()), - CORBA::NO_MEMORY ()); + CIAO_Container_i (config, 0, name, &policies, + this->orb_.in (), this->poa_.in ()), + CORBA::NO_MEMORY ()); CIAO_DEBUG ((LM_DEBUG, CLINFO "CIAO_ComponentServer_i::create_container - " "Container servant successfully allocated.\n")); @@ -91,7 +89,7 @@ namespace CIAO return cont_var._retn (); } - catch (CORBA::NO_MEMORY &) + catch (const CORBA::NO_MEMORY &) { CIAO_ERROR ((LM_CRITICAL, CLINFO "CIAO_ComponentServer_Impl: Out of memory exception whilst creating container.\n")); throw; @@ -121,7 +119,6 @@ namespace CIAO throw Components::RemoveFailure (); } - if (this->containers_.is_empty ()) { CIAO_ERROR ((LM_ERROR, CLINFO @@ -130,7 +127,6 @@ namespace CIAO throw Components::RemoveFailure (); } - try { CONTAINERS::ITERATOR i (this->containers_.begin ()); @@ -162,13 +158,12 @@ namespace CIAO } } } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { CIAO_ERROR ((LM_ERROR, CLINFO "CIAO_ComponentServer_i::remove_container - " "Caught CORBA exception whilst removing container: %C\n", ex._info ().c_str ())); } - catch (...) { CIAO_ERROR ((LM_ERROR, CLINFO "CIAO_ComponentServer_i::remove_container - Error: Unknown exception caught while removing a container.\n")); @@ -182,8 +177,7 @@ namespace CIAO { CIAO_TRACE("CIAO_ComponentServer_i::get_containers"); - ::Components::Deployment::Containers *tmp(0); - // tmp = new ::Components::Deployment::Containers (); + ::Components::Deployment::Containers *tmp = 0; ACE_NEW_THROW_EX (tmp, ::Components::Deployment::Containers (this->containers_.size ()), CORBA::NO_MEMORY ()); @@ -216,7 +210,7 @@ namespace CIAO { (*i)->remove (); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { successful = false; CIAO_ERROR ((LM_ERROR, CLINFO @@ -240,8 +234,9 @@ namespace CIAO } void - CIAO_ComponentServer_i::init (::Components::Deployment::ServerActivator_ptr sa, - Components::ConfigValues *cvs) + CIAO_ComponentServer_i::init ( + ::Components::Deployment::ServerActivator_ptr sa, + Components::ConfigValues *cvs) { this->serv_act_ = ::Components::Deployment::ServerActivator::_duplicate(sa); this->config_values_ = cvs; diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_Container_Impl.h b/flat/CIAO/ciao/ComponentServer/CIAO_Container_Impl.h index 2535ed5d73b..256ab02d8e4 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_Container_Impl.h +++ b/flat/CIAO/ciao/ComponentServer/CIAO_Container_Impl.h @@ -28,46 +28,40 @@ namespace CIAO : public virtual POA_CIAO::Deployment::Container { public: - // Constructor + /// Constructor CIAO_Container_i (const Components::ConfigValues &config, - const Static_Config_EntryPoints_Maps *, - const char *, - const CORBA::PolicyList *, - CORBA::ORB_ptr, - PortableServer::POA_ptr); - // Destructor + const Static_Config_EntryPoints_Maps *, + const char *, + const CORBA::PolicyList *, + CORBA::ORB_ptr, + PortableServer::POA_ptr); + + /// Destructor virtual ~CIAO_Container_i (void); - virtual - ::Components::CCMObject_ptr install_component (const char * id, - const char * entrypt, - const ::Components::ConfigValues & config); + virtual ::Components::CCMObject_ptr install_component ( + const char * id, + const char * entrypt, + const ::Components::ConfigValues & config); - virtual - void remove_component (::Components::CCMObject_ptr cref); + virtual void remove_component (::Components::CCMObject_ptr cref); - virtual - ::CIAO::Deployment::CCMObjects * get_components (void); + virtual ::CIAO::Deployment::CCMObjects * get_components (void); - virtual - ::Components::ConfigValues * configuration (void); + virtual ::Components::ConfigValues * configuration (void); virtual ::Components::Deployment::ComponentServer_ptr get_component_server (void); - virtual - ::Components::CCMHome_ptr install_home (const char * id, + virtual ::Components::CCMHome_ptr install_home (const char * id, const char * entrypt, const ::Components::ConfigValues & config); - virtual - void remove_home (::Components::CCMHome_ptr href); + virtual void remove_home (::Components::CCMHome_ptr href); - virtual - ::Components::CCMHomes * get_homes (void); + virtual ::Components::CCMHomes * get_homes (void); - virtual - void remove (void); + virtual void remove (void); virtual void activate_component (::Components::CCMObject_ptr comp); @@ -89,30 +83,31 @@ namespace CIAO /// To store all created CCMHome object typedef ACE_Hash_Map_Manager_Ex<ACE_CString, - Components::CCMHome_var, - ACE_Hash<ACE_CString>, - ACE_Equal_To<ACE_CString>, - ACE_Null_Mutex> CCMHome_Map; + Components::CCMHome_var, + ACE_Hash<ACE_CString>, + ACE_Equal_To<ACE_CString>, + ACE_Null_Mutex> CCMHome_Map; + typedef CCMHome_Map::iterator Home_Iterator; CCMHome_Map home_map_; /// To store all created Component object. // @@Gan, see how this caching is duplicated.. typedef ACE_Hash_Map_Manager_Ex<ACE_CString, - Components::CCMObject_var, - ACE_Hash<ACE_CString>, - ACE_Equal_To<ACE_CString>, - ACE_Null_Mutex> CCMComponent_Map; + Components::CCMObject_var, + ACE_Hash<ACE_CString>, + ACE_Equal_To<ACE_CString>, + ACE_Null_Mutex> CCMComponent_Map; + typedef CCMComponent_Map::iterator Component_Iterator; CCMComponent_Map component_map_; typedef ACE_Hash_Map_Manager_Ex<ACE_CString, - ACE_CString, - ACE_Hash<ACE_CString>, - ACE_Equal_To<ACE_CString>, - ACE_Null_Mutex> CCMNaming_Map; + ACE_CString, + ACE_Hash<ACE_CString>, + ACE_Equal_To<ACE_CString>, + ACE_Null_Mutex> CCMNaming_Map; CCMNaming_Map naming_map_; - }; } } diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp b/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp index e60ce7e986a..9496216eea7 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp +++ b/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp @@ -300,8 +300,7 @@ namespace CIAO // If service configuration file is specified through RTCCM // descriptors, then we should honor it as well. - if (ACE_OS::strcmp (sr->svcconf.in (), - "") != 0) + if (ACE_OS::strcmp (sr->svcconf.in (), "") != 0) { CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO_ServerActivator_i::construct_command_line - Using SvcConf file %C\n ", @@ -335,8 +334,11 @@ namespace CIAO CIAO_DEBUG ((LM_DEBUG, CLINFO "CIAO_ServerActivator_i::spawn_component_server - " "Using provided component server executable:%C\n", path)); } - else CIAO_DEBUG ((LM_DEBUG, CLINFO "CIAO_ServerActivator_i::spawn_component_server - " - "Using default component server execuable\n")); + else + { + CIAO_DEBUG ((LM_DEBUG, CLINFO "CIAO_ServerActivator_i::spawn_component_server - " + "Using default component server execuable\n")); + } options.command_line ("%s %s -c %s", path, @@ -349,8 +351,8 @@ namespace CIAO "CIAO_ServerActivator_i::spawn_component_server - Spawning process, command line is %s\n", options.command_line_buf ())); - pid_t pid = this->process_manager_.spawn (options, - &this->child_handler_); + pid_t const pid = this->process_manager_.spawn (options, + &this->child_handler_); if (pid == ACE_INVALID_PID) { @@ -500,30 +502,27 @@ namespace CIAO ::Components::Deployment::ComponentServers_var retval = new Components::Deployment::ComponentServers (this->server_infos_.size ()); - if (retval->length () == 0) - return retval; - - CORBA::ULong pos = 0; for (SERVER_INFOS::ITERATOR i (this->server_infos_); !i.done (); ++i) { - retval[pos++] = ::Components::Deployment::ComponentServer::_duplicate ((*i)->ref_); + retval[pos++] = + ::Components::Deployment::ComponentServer::_duplicate ((*i)->ref_); } return retval._retn (); } void - CIAO_ServerActivator_i::create_component_server_config_values (const Server_Info &, - Components::ConfigValues_out &config) + CIAO_ServerActivator_i::create_component_server_config_values ( + const Server_Info &, + Components::ConfigValues_out &config) { ACE_NEW_THROW_EX (config, Components::ConfigValues (0), CORBA::NO_MEMORY ()); } - } } diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.h b/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.h index 4ee3a82c9be..530ccb35657 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.h +++ b/flat/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.h @@ -29,20 +29,16 @@ namespace CIAO //namespace //{ /** - * @class Child_Handler - * @brief The signal handler class for the SIGCHLD - * handling to avoid zombies - * + * @brief The signal handler class for the SIGCHLD handling to avoid + * zombies */ class Child_Handler : public virtual ACE_Event_Handler { public: - virtual int handle_signal (int sig, + virtual int handle_signal (int, siginfo_t *, ucontext_t *) { - ACE_UNUSED_ARG (sig); - // @@ Note that this code is not portable to all OS platforms // since it uses print statements within signal handler context. ACE_exitcode status; @@ -50,15 +46,14 @@ namespace CIAO // -1 to wait for any child process // and WNOHANG so that it retuurns immediately ACE_OS::waitpid (-1 ,&status, WNOHANG, 0); - + return 0; } }; // } - - + + /** - * @class CIAO_ServerActivator_i * @author William R. Otte <wotte@dre.vanderbilt.edu> * @brief Default server activator for CIAO component servers. * @@ -72,7 +67,7 @@ namespace CIAO : public virtual POA_CIAO::Deployment::ServerActivator { public: - // Constructor + // Constructor CIAO_ServerActivator_i (CORBA::ULong def_spawn_delay, const char * default_cs_path, const char * cs_args, @@ -80,39 +75,40 @@ namespace CIAO CORBA::ORB_ptr orb, PortableServer::POA_ptr poa_); - - // Destructor + // Destructor virtual ~CIAO_ServerActivator_i (void); - + virtual - void component_server_callback (::Components::Deployment::ComponentServer_ptr serverref, - const char * server_UUID, - ::Components::ConfigValues_out config); - + void component_server_callback ( + ::Components::Deployment::ComponentServer_ptr serverref, + const char * server_UUID, + ::Components::ConfigValues_out config); + virtual void configuration_complete (const char *server_UUID); - + virtual - ::Components::Deployment::ComponentServer_ptr + ::Components::Deployment::ComponentServer_ptr create_component_server (const ::Components::ConfigValues & config); - + virtual - void remove_component_server (::Components::Deployment::ComponentServer_ptr server); - + void remove_component_server ( + ::Components::Deployment::ComponentServer_ptr server); + virtual ::Components::Deployment::ComponentServers * get_component_servers (void); - + private: struct Server_Info; - - /// Builds command line options based on configuration information. - /// May modify the uuid of the component server. + + /// Builds command line options based on configuration information. + /// May modify the uuid of the component server. ACE_CString construct_command_line (Server_Info &si); /// Spawns the component server process, but does not wait for it - /// to call back. + /// to call back. pid_t spawn_component_server (const Server_Info &si, const ACE_CString &cmd_line); - + /// This method is only applicable when our program is configured as /// singled threaded . Internally it uses a <perform_work> blocking /// call to wait for NA object to call back @@ -121,34 +117,34 @@ namespace CIAO /// This method is only applicable when our program is configured as /// multiple threaded. Internally it waits on a conditional variable - /// that could be modified by the callback servant which runs in + /// that could be modified by the callback servant which runs in /// another thread void multi_threaded_wait_for_callback (const Server_Info &si, ACE_Time_Value &timeout); - + void create_component_server_config_values (const Server_Info &info, Components::ConfigValues_out &config); - + struct Server_Info { Server_Info (size_t cmap_size_hint = 128) - : cmap_ (new CIAO::Utility::CONFIGVALUE_MAP (cmap_size_hint)), + : cmap_ (new CIAO::Utility::CONFIGVALUE_MAP (cmap_size_hint)), ref_ (Components::Deployment::ComponentServer::_nil ()), pid_ (ACE_INVALID_PID), activated_ (false) {} typedef ACE_Refcounted_Auto_Ptr <CIAO::Utility::CONFIGVALUE_MAP, ACE_Null_Mutex> CONFIGVALUE_MAP_PTR; - + ACE_CString uuid_; CONFIGVALUE_MAP_PTR cmap_; Components::Deployment::ComponentServer_var ref_; pid_t pid_; bool activated_; }; - + typedef ACE_Refcounted_Auto_Ptr<Server_Info, ACE_Null_Mutex> Safe_Server_Info; - + struct _server_info { bool operator() (const Safe_Server_Info &a, const Safe_Server_Info &b) const @@ -156,37 +152,37 @@ namespace CIAO return a->uuid_ == b->uuid_; } }; - + // Presumably, there won't be too many component servers per node application typedef ACE_Unbounded_Set_Ex <Safe_Server_Info, _server_info> SERVER_INFOS; /// Default args to pass to all componentservers. ACE_CString default_args_; - + SERVER_INFOS server_infos_; - + ACE_Process_Manager process_manager_; - + Child_Handler child_handler_; - + CORBA::ULong spawn_delay_; - + /////*******NEW bool multithreaded_; - + CORBA::ORB_var orb_; - + PortableServer::POA_var poa_; - + ACE_CString cs_path_; - + ACE_CString cs_args_; - + ACE_Thread_Mutex mutex_; - + ACE_Condition<ACE_Thread_Mutex> condition_; }; - + } } diff --git a/flat/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl b/flat/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl index 8516c3fd1ec..751569143c0 100644 --- a/flat/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl +++ b/flat/CIAO/ciao/ComponentServer/CIAO_ServerResources.idl @@ -206,8 +206,8 @@ module CIAO */ struct ThreadpoolPolicyDef { - string Id; // Threadpool name defined in - // ORBResource + /// Threadpool name defined in ORBResource + string Id; }; /** @@ -216,8 +216,8 @@ module CIAO */ struct PriorityBandedConnectionPolicyDef { - string Id; // PriorityBands name defined in - // ORBResource + /// PriorityBands name defined in ORBResource + string Id; }; union PolicyDef switch (CORBA::PolicyType) @@ -239,7 +239,8 @@ module CIAO */ struct PolicySet { - string Id; // Name of this policy set + /// Name of this policy set + string Id; PolicyDefs policies; }; diff --git a/flat/CIAO/ciao/ComponentServer/Configurator_Factory.cpp b/flat/CIAO/ciao/ComponentServer/Configurator_Factory.cpp index 3060e2775d9..9027da2559b 100644 --- a/flat/CIAO/ciao/ComponentServer/Configurator_Factory.cpp +++ b/flat/CIAO/ciao/ComponentServer/Configurator_Factory.cpp @@ -12,30 +12,29 @@ namespace CIAO Configurator_Factory::operator() (int &argc, ACE_TCHAR **argv) { CIAO_TRACE ("Configurator_Factory::operator()"); - this->parse_args (argc, argv); + bool const rt = this->parse_args (argc, argv); ComponentServer_Configurator *ptr = 0; ACE_NEW_THROW_EX (ptr, - ComponentServer_Configurator (this->rt_), + ComponentServer_Configurator (rt), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return ptr; } - void + bool Configurator_Factory::parse_args (int &argc, ACE_TCHAR **argv) { CIAO_TRACE ("Configurator_Factory::parse_args"); ACE_Arg_Shifter shifter (argc, argv); - - this->rt_ = false; + bool retval = false; while (shifter.is_anything_left ()) { if (shifter.cur_arg_strncasecmp (ACE_TEXT("-r")) == 0) { - this->rt_ = true; + retval = true; shifter.consume_arg (); } else @@ -43,6 +42,7 @@ namespace CIAO shifter.ignore_arg (); } } + return retval; } } } diff --git a/flat/CIAO/ciao/ComponentServer/Configurator_Factory.h b/flat/CIAO/ciao/ComponentServer/Configurator_Factory.h index 8478d853f11..374bcb244e8 100644 --- a/flat/CIAO/ciao/ComponentServer/Configurator_Factory.h +++ b/flat/CIAO/ciao/ComponentServer/Configurator_Factory.h @@ -29,8 +29,7 @@ namespace CIAO ComponentServer_Configurator * operator () (int &argc, ACE_TCHAR **argv); private: - void parse_args (int &argc, ACE_TCHAR **argv); - bool rt_; + bool parse_args (int &argc, ACE_TCHAR **argv); }; } } diff --git a/flat/CIAO/ciao/Containers/Container_Base.cpp b/flat/CIAO/ciao/Containers/Container_Base.cpp index fd3548ffad9..88c669fe819 100644 --- a/flat/CIAO/ciao/Containers/Container_Base.cpp +++ b/flat/CIAO/ciao/Containers/Container_Base.cpp @@ -40,10 +40,9 @@ namespace CIAO if (this->rec_pol_map_.find (name, policy_list) != 0) { CIAO_ERROR ((LM_WARNING, CLINFO - "Container_i::Ger_receptacle_policy - Unable to find policies " + "Container_i::get_receptacle_policy - Unable to find policies " "for the receptacle %C\n", name)); - policy_list->length (0); } return policy_list._retn (); diff --git a/flat/CIAO/ciao/Containers/Container_Base.h b/flat/CIAO/ciao/Containers/Container_Base.h index 7702081368a..cadfc64d314 100644 --- a/flat/CIAO/ciao/Containers/Container_Base.h +++ b/flat/CIAO/ciao/Containers/Container_Base.h @@ -69,7 +69,7 @@ namespace CIAO /// Initialize the container with a name. virtual void init (const char *name = 0, - const CORBA::PolicyList *more_policies = 0) = 0; + const CORBA::PolicyList *more_policies = 0) = 0; /// Get component's POA. /** diff --git a/flat/CIAO/ciao/Containers/Servant_Activator.cpp b/flat/CIAO/ciao/Containers/Servant_Activator.cpp index f3d0159bb1b..3f2549bffe0 100644 --- a/flat/CIAO/ciao/Containers/Servant_Activator.cpp +++ b/flat/CIAO/ciao/Containers/Servant_Activator.cpp @@ -77,9 +77,9 @@ namespace CIAO PortableServer::ObjectId_to_string (oid); CIAO_DEBUG ((LM_INFO, CLINFO - "Servant_Activator_i::incarnate, " - "Attempting to activate port name [%C] \n", - str.in ())); + "Servant_Activator_i::incarnate, " + "Attempting to activate port name [%C] \n", + str.in ())); { ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, @@ -111,9 +111,9 @@ namespace CIAO // We should try avoiding making outbound calls with the // lock held. Oh well, let us get some sense of sanity in // CIAO to do think about these. - CIAO_DEBUG ((LM_INFO, CLINFO - "Servant_Activator_i::incarnate - Activating Port %C\n", - str.in ())); + CIAO_DEBUG ((LM_INFO, CLINFO + "Servant_Activator_i::incarnate - Activating Port %C\n", + str.in ())); return this->pa_[t]->activate (oid); } @@ -142,14 +142,14 @@ namespace CIAO if (this->pa_.get (pa, t) == -1) { CIAO_ERROR ((LM_ERROR, CLINFO - "Servant_Activator_i::etherealize - Could not get Port Activator\n")); + "Servant_Activator_i::etherealize - Could not get Port Activator\n")); continue; } if (tmp == 0) { CIAO_ERROR ((LM_ERROR, CLINFO - "Servant_Activator_i::etherealize - Port Activator is NULL\n")); + "Servant_Activator_i::etherealize - Port Activator is NULL\n")); continue; } diff --git a/flat/CIAO/ciao/Containers/Servant_Activator.h b/flat/CIAO/ciao/Containers/Servant_Activator.h index 307169622cf..997355b8223 100644 --- a/flat/CIAO/ciao/Containers/Servant_Activator.h +++ b/flat/CIAO/ciao/Containers/Servant_Activator.h @@ -78,7 +78,6 @@ namespace CIAO PortableServer::Servant servant, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations); - /// Local helper methods private: @@ -86,7 +85,7 @@ namespace CIAO CORBA::ORB_var orb_; /// @@ This should be changed at some point of time so that we - /// don't land up with a linear algorithm + /// don't land up with a linear algorithm typedef ACE_Array_Base<Port_Activator_var> Port_Activators; /// Array of port activators diff --git a/flat/CIAO/ciao/Containers/Session/Session_Container.cpp b/flat/CIAO/ciao/Containers/Session/Session_Container.cpp index b16cb1f7f66..b310868d1c9 100644 --- a/flat/CIAO/ciao/Containers/Session/Session_Container.cpp +++ b/flat/CIAO/ciao/Containers/Session/Session_Container.cpp @@ -131,9 +131,7 @@ namespace CIAO root->the_POAManager (); this->component_poa_ = - root->create_POA (name, - poa_manager.in (), - policies); + root->create_POA (name, poa_manager.in (), policies); } void @@ -634,7 +632,7 @@ namespace CIAO if (component_servant == 0) { - CIAO_ERROR ((LM_ERROR, CLINFO + CIAO_ERROR ((LM_ERROR, CLINFO "Session_Container::ciao_install_component - Component servant factory failed.\n")); throw Components::Deployment::InstallationFailure (); } diff --git a/flat/CIAO/ciao/Containers/Session/Session_Container.h b/flat/CIAO/ciao/Containers/Session/Session_Container.h index 6d0eac75639..3427f3164c2 100644 --- a/flat/CIAO/ciao/Containers/Session/Session_Container.h +++ b/flat/CIAO/ciao/Containers/Session/Session_Container.h @@ -61,7 +61,6 @@ namespace CIAO ACE_Null_Mutex> HOMESERVANTCREATOR_FUNCPTR_MAP; - typedef ACE_Hash_Map_Manager_Ex<ACE_CString, ComponentFactory, ACE_Hash<ACE_CString>, @@ -99,8 +98,8 @@ namespace CIAO Deployment::CIAO_Container_i *container_impl, bool static_config_flag = false, const Static_Config_EntryPoints_Maps* static_entrypts_maps =0, - const char *name = 0, - const CORBA::PolicyList *more_policies = 0); + const char *name = 0, + const CORBA::PolicyList *more_policies = 0); virtual ~Session_Container (void); @@ -132,9 +131,9 @@ namespace CIAO const char *name); virtual void activate_component (Components::CCMObject_ptr compref); - + virtual void passivate_component (Components::CCMObject_ptr compref); - + virtual void uninstall_component (Components::CCMObject_ptr compref); |