From f67a045b54eee492d62b79564e94d12a122fecda Mon Sep 17 00:00:00 2001 From: dengg Date: Sat, 17 Dec 2005 16:54:08 +0000 Subject: Fri Dec 16 15:58:27 2005 Gan Deng --- TAO/CIAO/ChangeLog | 23 ++++++++++++++++++++++ .../NodeApplicationManager/Containers_Info_Map.cpp | 16 ++++++++------- TAO/CIAO/ciao/Container_Base.cpp | 22 +++++++++++++++++++-- TAO/CIAO/ciao/Container_Base.h | 1 + 4 files changed, 53 insertions(+), 9 deletions(-) diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 59bbef90d22..9328727e04c 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,26 @@ +Fri Dec 16 15:58:27 2005 Gan Deng + + * DAnCE/NodeApplicationManager/Containers_Info_Map.cpp + + Modified to fix a bug reported by Will Otte regarding + DAnCE's parsing of deployment plan to find component + servant and executor libraries. This is a temporary + workaround so even if a component name happens to + have "_exec" string inside it, DAnCE could still + work correctly to find the corresponding servant + and executor libraries. + +Fri Dec 16 14:57:21 2005 Gan Deng + + * ciao/Container_Base.cpp + * ciao/Container_Base.h + + Fixed a bug about RT-CCM. The bug creeped out when the + facet_consumer_poa_ is not configured properly to use + application specific real-time policies. Thanks to + Roland Schimmack for + reporting this bug. + Tue Dec 13 12:13:26 2005 Douglas C. Schmidt * COPYING: Updated this file to mention compliance issues wrt the diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp b/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp index beb6f32cd17..1b0f80038ea 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp @@ -220,7 +220,7 @@ namespace CIAO bool svnt_found = false; bool exec_found = false; - // For svnt artifact + // For svnt/exec artifacts for (CORBA::ULong j = 0; j < artifact_num; ++j) { const Deployment::ArtifactDeploymentDescription & arti = @@ -235,7 +235,7 @@ namespace CIAO // should have only 1 _svnt and 1 _exec libs. if (!svnt_found && ((pos = tmp.find ("_svnt")) != ACE_CString::npos || - (pos = tmp.find ("_Svnt")) != ACE_CString::npos)) + (pos = tmp.find ("_Svnt")) != ACE_CString::npos)) { if (arti.location.length() < 1 ) { @@ -253,8 +253,8 @@ namespace CIAO const CORBA::ULong prop_length = arti.execParameter.length (); for (CORBA::ULong prop_num = 0; - prop_num < prop_length; - ++prop_num) + prop_num < prop_length; + ++prop_num) { ACE_CString name (arti.execParameter[prop_num].name.in ()); if (name == ACE_CString ("entryPoint")) @@ -269,13 +269,15 @@ namespace CIAO ACE_DEBUG ((LM_DEBUG, "We only support entrypoint at this point in CIAO.\n")); } } + + continue; // continue for the next artifact } // As one can see, code is duplicated here. I will come back for this later. // For exec artifact if (!exec_found && ((pos = tmp.find ("_exec")) != ACE_CString::npos || - (pos = tmp.find ("_Exec")) != ACE_CString::npos)) + (pos = tmp.find ("_Exec")) != ACE_CString::npos)) { if (arti.location.length() < 1 ) { @@ -293,8 +295,8 @@ namespace CIAO // Get the entry point. const CORBA::ULong prop_length = arti.execParameter.length (); for (CORBA::ULong prop_num = 0; - prop_num < prop_length; - ++prop_num) + prop_num < prop_length; + ++prop_num) { ACE_CString name (arti.execParameter[prop_num].name.in ()); if (name == ACE_CString ("entryPoint")) diff --git a/TAO/CIAO/ciao/Container_Base.cpp b/TAO/CIAO/ciao/Container_Base.cpp index a71a555f673..6e9eab08f0a 100644 --- a/TAO/CIAO/ciao/Container_Base.cpp +++ b/TAO/CIAO/ciao/Container_Base.cpp @@ -125,6 +125,7 @@ namespace CIAO ACE_CString port_poa_name (name); port_poa_name += ":Port_POA"; this->create_facet_consumer_POA (port_poa_name.c_str (), + more_policies, root_poa.in () ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); @@ -172,6 +173,7 @@ namespace CIAO void Session_Container::create_facet_consumer_POA ( const char *name, + const CORBA::PolicyList *p, PortableServer::POA_ptr root ACE_ENV_ARG_DECL) { @@ -179,14 +181,25 @@ namespace CIAO root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - TAO::Utils::PolicyList_Destroyer policies (3); - policies.length (3); + CORBA::ULong p_length; + if (p != 0) + { + p_length = p->length (); + } + else + { + p_length = 0; + } + + TAO::Utils::PolicyList_Destroyer policies (p_length + 3); + policies.length (p_length + 3); policies[0] = root->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); ACE_CHECK; + // Servant Manager Policy policies[1] = root->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER @@ -199,6 +212,11 @@ namespace CIAO ACE_ENV_ARG_PARAMETER); ACE_CHECK; + for (CORBA::ULong i = 0; i < p_length; ++i) + { + policies[i+3] = (*p)[i]; + } + this->facet_cons_poa_ = root->create_POA (name, poa_manager.in (), diff --git a/TAO/CIAO/ciao/Container_Base.h b/TAO/CIAO/ciao/Container_Base.h index f6ae970238a..a4420a92616 100644 --- a/TAO/CIAO/ciao/Container_Base.h +++ b/TAO/CIAO/ciao/Container_Base.h @@ -310,6 +310,7 @@ namespace CIAO /// Create POA for the facets and consumers alone. void create_facet_consumer_POA (const char *name, + const CORBA::PolicyList *p, PortableServer::POA_ptr root ACE_ENV_ARG_DECL_WITH_DEFAULTS); -- cgit v1.2.1