From 16a7584ad56d0ce715a06df1f80b3c711df5fe34 Mon Sep 17 00:00:00 2001 From: dengg Date: Thu, 26 Oct 2006 16:45:09 +0000 Subject: Merged from CIAO-events-3 branch. --- .../Deployment_Configuration.cpp | 2 +- .../DomainApplicationManager_Impl.cpp | 43 +++++++--------------- .../DomainApplicationManager_Impl.h | 6 +-- 3 files changed, 18 insertions(+), 33 deletions(-) diff --git a/modules/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp b/modules/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp index 7692884e278..a7123da88b4 100644 --- a/modules/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp +++ b/modules/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp @@ -48,7 +48,7 @@ CIAO::Deployment_Configuration::init (const char *filename) // if (this->deployment_info_.bind (destination, ior) != 0) { - ACE_ERROR ((LM_ERROR, + ACE_DEBUG ((LM_ERROR, "DAnCE (%P|%t) Deployment_Configuration.cpp:" "Reuse existing node in the cached map: [%s]\n", destination)); diff --git a/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp b/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp index 3c312a41c73..a8b60e4c0f4 100644 --- a/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp +++ b/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp @@ -670,16 +670,6 @@ install_all_es (void) { for (CORBA::ULong j = 0; j < this->esd_->length (); ++j) { - // Construct the ESInstallationInfos data - Deployment::ESInstallationInfos_var es_infos; - ACE_NEW (es_infos, - Deployment::ESInstallationInfos); - - es_infos->length (1); - (*es_infos)[0].id = this->esd_[j].name.in (); - (*es_infos)[0].type = CIAO::RTEC; //only RTEC is supported so far - (*es_infos)[0].svcconf = this->esd_[j].svc_cfg_file.in (); - // Find NA, and then invoke operation on it ACE_Hash_Map_Entry *entry = 0; @@ -707,11 +697,11 @@ install_all_es (void) ::Deployment::NodeApplication_ptr my_na = (entry->int_id_).node_application_.in (); - ::Deployment::CIAO_Event_Services_var event_services = - my_na->install_es (es_infos); + ::CIAO::CIAO_Event_Service_var ciao_es = + my_na->install_es (this->esd_[j]); // Add these returned ES objects into the cached map - this->add_es_to_map (es_infos, event_services); + this->add_es_to_map (this->esd_[j].name.in (), ciao_es.in ()); } } ACE_CATCHANY @@ -727,21 +717,16 @@ install_all_es (void) void CIAO::DomainApplicationManager_Impl:: -add_es_to_map (Deployment::ESInstallationInfos * es_infos, - Deployment::CIAO_Event_Services * event_services) +add_es_to_map (const char * node_name, + CIAO::CIAO_Event_Service * ciao_es) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::StartError)) { ACE_TRY { - CORBA::ULong es_length = event_services->length (); - - for (CORBA::ULong i = 0; i < es_length; ++i) - { - this->es_map_.bind ( - (*es_infos)[i].id.in (), - CIAO::CIAO_Event_Service::_duplicate ((*event_services)[i])); - } + this->es_map_.bind ( + node_name, + CIAO::CIAO_Event_Service::_duplicate (ciao_es)); } ACE_CATCHANY { @@ -1311,7 +1296,7 @@ handle_es_connection ( if (binding.deployRequirement.length () != 0) { retv[len].config = - this->get_connection_QoS_configuration (binding.deployRequirement[0]); + * (this->get_connection_QoS_configuration (binding.deployRequirement[0])); } // If we didnt find the objref of the connection ... @@ -2055,13 +2040,13 @@ purge_connections (Deployment::Connections_var & connections, } } -const Deployment::Properties & +Deployment::Properties * CIAO::DomainApplicationManager_Impl:: get_connection_QoS_configuration (const Deployment::Requirement & requirement) { // Get the name/identifier of the filter associated with // this connection - Deployment::Properties_var retv; + Deployment::Properties * retv; ACE_NEW_NORETURN (retv, Deployment::Properties); CORBA::ULong len = retv->length (); @@ -2093,12 +2078,12 @@ get_connection_QoS_configuration (const Deployment::Requirement & requirement) filter_name) == 0) { retv->length (len + 1); - retv[len].name = CORBA::string_dup ("EventFilter"); - retv[len].value <<= this->esd_[j].filters[k]; + (*retv)[len].name = CORBA::string_dup ("EventFilter"); + (*retv)[len].value <<= this->esd_[j].filters[k]; break; } } } } - return retv.inout (); + return retv; } diff --git a/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.h b/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.h index 49e52ee7d37..b628b699462 100644 --- a/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.h +++ b/modules/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.h @@ -398,8 +398,8 @@ namespace CIAO * Add all CIAO_Event_Service objects into the cached map. */ virtual void - add_es_to_map (Deployment::ESInstallationInfos * es_infos, - Deployment::CIAO_Event_Services * event_services) + add_es_to_map (const char* node_name, + CIAO::CIAO_Event_Service * ciao_es) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::StartError)); @@ -408,7 +408,7 @@ namespace CIAO * deployment requirement. The deployment requirement only specifies * an identifier/reference to the EventServiceDeploymentDescriptions. */ - virtual const Deployment::Properties & + virtual Deployment::Properties * get_connection_QoS_configuration ( const Deployment::Requirement & requirement); -- cgit v1.2.1