From acfdcb9dadd564d983560d887af5d8b231e67916 Mon Sep 17 00:00:00 2001 From: dengg Date: Thu, 18 Nov 2004 17:53:46 +0000 Subject: *** empty log message *** --- .../DomainApplicationManager_Impl.cpp | 12 ++- TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp | 116 ++++++++++++++------- TAO/CIAO/DAnCE/ciao/CIAO_RTEvent.cpp | 6 +- TAO/CIAO/DAnCE/ciao/Container_Base.cpp | 6 +- 4 files changed, 95 insertions(+), 45 deletions(-) diff --git a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp index 1d1a663c012..c1c5a482a52 100644 --- a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp +++ b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp @@ -5,6 +5,8 @@ #include "ace/OS_NS_string.h" #include "NodeManager/NodeDaemonC.h" +#include "Config_Handlers/DnC_Dump.h" + #if !defined (__ACE_INLINE__) # include "DomainApplicationManager_Impl.inl" #endif /* __ACE_INLINE__ */ @@ -91,6 +93,8 @@ init (ACE_ENV_SINGLE_ARG_DECL) //::Deployment::DnC_Dump::dump (artifacts.child_plan_); } + ::Deployment::DnC_Dump::dump (artifacts.child_plan_); + // Call preparePlan() method on the NodeManager with the // corresponding child plan as input, which returns a // NodeApplicationManager object reference. @@ -433,7 +437,8 @@ finishLaunch (::CORBA::Boolean start //@@ Note: Don't delete the below debugging helpers. // Dump the connections for debug purpose. - if (CIAO::debug_level () > 1) + //if (CIAO::debug_level () > 1) + if (true) { ACE_DEBUG ((LM_DEBUG, "==============================================\n")); ACE_DEBUG ((LM_DEBUG, "dump incomming connection for child plan:%d\n", i)); @@ -451,7 +456,8 @@ finishLaunch (::CORBA::Boolean start Deployment::Connections_var safe (my_connections); // Dump the connections for debug purpose. - if (CIAO::debug_level () > 1) + //if (CIAO::debug_level () > 1) + if (true) { ACE_DEBUG ((LM_DEBUG, "==============================================\n")); ACE_DEBUG ((LM_DEBUG, "dump outgoingcomming connection for child plan:%d\n", i)); @@ -659,7 +665,7 @@ get_outgoing_connections_i (const char * instname, // If the component name matches the name of one of the // endpoints in the connection. if (ACE_OS::strcmp (this->plan_.instance[endpoint.instanceRef].name.in (), - instname) == 0 ) + instname) == 0 ) { //Look at the port kind to make sure it's what we are interested in. if (endpoint.kind != Deployment::Facet && diff --git a/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp b/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp index f8f16019b95..9fa5cf18fce 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/Update_Plan.cpp @@ -24,6 +24,7 @@ namespace CIAO // traverse the package configuration structure to get to the // BasePackage which consists of assemblies. // + REF_MAP plan_ref_map; CORBA::ULong bp_len = pc->basePackage.length (); @@ -54,7 +55,8 @@ namespace CIAO // // traverse the individual assembly. // - traverse_assembly (assembly, plan, ref_map, primary_ref_map); + traverse_assembly (assembly, plan, ref_map, primary_ref_map, + plan_ref_map); } } } @@ -63,7 +65,8 @@ namespace CIAO void traverse_assembly (ComponentAssemblyDescription &assembly, DeploymentPlan &plan, - REF_MAP &ref_map, REF_MAP &primary_ref_map) + REF_MAP &ref_map, REF_MAP &primary_ref_map, + REF_MAP &plan_ref_map) { // traverse the assembly (ComponentAssemblyDescription) and // processes the instances and the connection within the assembly. @@ -84,7 +87,8 @@ namespace CIAO if (strcmp (plan_name, in_name) == 0) { traverse_assembly_instance (ins, plan, l, - ref_map, primary_ref_map); + ref_map, primary_ref_map, + plan_ref_map); } } } @@ -183,7 +187,8 @@ namespace CIAO SubcomponentInstantiationDescription &instance, DeploymentPlan &plan, int l, - REF_MAP &ref_map, REF_MAP &primary_ref_map) + REF_MAP &ref_map, REF_MAP &primary_ref_map, + REF_MAP &plan_ref_map) { // Each instance has a package. // Each package has an implementation and their correspoding artifacts. @@ -217,7 +222,8 @@ namespace CIAO mid = impl.referencedImplementation.monolithicImpl[p]; update_artifacts (mid, plan, plan.instance[l], - ref_map, primary_ref_map, art_ref_map, + ref_map, primary_ref_map, art_ref_map, + plan_ref_map, plan.implementation[impl_length]); } update_impl_config_property (impl, plan.implementation[impl_length], @@ -232,8 +238,12 @@ namespace CIAO InstanceDeploymentDescription &instance, REF_MAP &ref_map, REF_MAP &primary_ref_map, ART_REF_MAP &art_ref_map, + REF_MAP &plan_ref_map, MonolithicDeploymentDescription &mdd) { + ref_map.unbind_all (); + primary_ref_map.unbind_all (); + art_ref_map.unbind_all (); CORBA::ULong prim_art_len = mid.primaryArtifact.length (); for (CORBA::ULong q = 0; q < prim_art_len; ++q) { @@ -241,26 +251,44 @@ namespace CIAO pack_iad = mid.primaryArtifact[q].referencedArtifact; ACE_TString artifact_name = (const char*)mid.primaryArtifact[q].name; int arti_len; + int plan_arti_len; CORBA::ULong art_length (plan.artifact.length ()); if (ref_map.find (artifact_name, arti_len) != 0) { - plan.artifact.length (art_length + 1); - plan.artifact[art_length].name = mid.primaryArtifact[q].name; - plan.artifact[art_length].node = instance.node; - ref_map.bind (artifact_name, art_length); - primary_ref_map.bind (artifact_name, art_length); - CORBA::ULong art_ref_len (mdd.artifactRef.length ()); - mdd.artifactRef.length (art_ref_len + 1); - mdd.artifactRef[art_ref_len] = art_length; - update_artifact_location (pack_iad, - plan.artifact[art_length]); - update_artifact_property (pack_iad, - plan.artifact[art_length]); + if (plan_ref_map.find (artifact_name, plan_arti_len) != 0) + { + plan.artifact.length (art_length + 1); + plan.artifact[art_length].name = mid.primaryArtifact[q].name; + plan.artifact[art_length].node = instance.node; + ref_map.bind (artifact_name, art_length); + plan_ref_map.bind (artifact_name, art_length); + primary_ref_map.bind (artifact_name, art_length); + CORBA::ULong art_ref_len (mdd.artifactRef.length ()); + mdd.artifactRef.length (art_ref_len + 1); + mdd.artifactRef[art_ref_len] = art_length; + update_artifact_location (pack_iad, + plan.artifact[art_length]); + update_artifact_property (pack_iad, + plan.artifact[art_length]); + } + else + { + art_length = plan_arti_len; + ref_map.bind (artifact_name, art_length); + primary_ref_map.bind (artifact_name, art_length); + CORBA::ULong art_ref_len (mdd.artifactRef.length ()); + mdd.artifactRef.length (art_ref_len + 1); + mdd.artifactRef[art_ref_len] = art_length; + update_artifact_location (pack_iad, + plan.artifact[art_length]); + update_artifact_property (pack_iad, + plan.artifact[art_length]); + } } update_common_artifact_and_art_ref (pack_iad, primary_ref_map, ref_map, - art_ref_map, mdd, + art_ref_map, plan_ref_map, mdd, plan, instance); } } @@ -272,19 +300,20 @@ namespace CIAO REF_MAP &primary_ref_map, REF_MAP &ref_map, ART_REF_MAP &art_ref_map, - + REF_MAP &plan_ref_map, MonolithicDeploymentDescription &mid, DeploymentPlan &plan, - - InstanceDeploymentDescription - &instance) + InstanceDeploymentDescription + &instance) { + int plan_arti_len; + int arti_len; + CORBA::ULong new_art_length; CORBA::ULong deps_len = pack_iad.dependsOn.length (); for (CORBA::ULong g = 0; g < deps_len; ++g) { ACE_TString dep_name = (const char*)pack_iad.dependsOn[g].name; - int arti_len; if (ref_map.find (dep_name, arti_len) == 0) { @@ -302,19 +331,34 @@ namespace CIAO ImplementationArtifactDescription depends_iad = pack_iad.dependsOn[g]. referencedArtifact; - CORBA::ULong new_art_length (plan.artifact.length ()); - plan.artifact.length (new_art_length + 1); - plan.artifact[new_art_length].name = - pack_iad.dependsOn[g].name; - plan.artifact[new_art_length].node = instance.node; - update_artifact_location (depends_iad, - plan.artifact - [new_art_length]); - ref_map.bind ( - (const char*)plan.artifact[new_art_length].name, - new_art_length); - update_impl_art_ref (mid, new_art_length); - art_ref_map.bind (new_art_length, new_art_length); + if (plan_ref_map.find (dep_name, plan_arti_len) != 0) + { + new_art_length = plan.artifact.length (); + plan.artifact.length (new_art_length + 1); + plan.artifact[new_art_length].name = + pack_iad.dependsOn[g].name; + plan.artifact[new_art_length].node = instance.node; + update_artifact_location (depends_iad, + plan.artifact + [new_art_length]); + ref_map.bind ( + (const char*)plan.artifact[new_art_length].name, + new_art_length); + plan_ref_map.bind ( + (const char*)plan.artifact[new_art_length].name, + new_art_length); + update_impl_art_ref (mid, new_art_length); + art_ref_map.bind (new_art_length, new_art_length); + } + else + { + new_art_length = plan_arti_len; + ref_map.bind ( + (const char*)plan.artifact[new_art_length].name, + new_art_length); + update_impl_art_ref (mid, new_art_length); + art_ref_map.bind (new_art_length, new_art_length); + } } } } diff --git a/TAO/CIAO/DAnCE/ciao/CIAO_RTEvent.cpp b/TAO/CIAO/DAnCE/ciao/CIAO_RTEvent.cpp index f7d90378ea4..9847fd27545 100644 --- a/TAO/CIAO/DAnCE/ciao/CIAO_RTEvent.cpp +++ b/TAO/CIAO/DAnCE/ciao/CIAO_RTEvent.cpp @@ -191,7 +191,7 @@ namespace CIAO CORBA::SystemException)) { - ACE_DEBUG ((LM_DEBUG, "-------------CIAO::RTEventService::push_event-----------------\n")); + ////ACE_DEBUG ((LM_DEBUG, "-------------CIAO::RTEventService::push_event-----------------\n")); RtecEventComm::EventSet events (1); events.length (1); @@ -235,7 +235,7 @@ namespace CIAO RTEventServiceConsumer_impl::push (const RtecEventComm::EventSet& events) ACE_THROW_SPEC ((CORBA::SystemException)) { - //ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventServiceConsumer_impl::push\n")); + ////ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventServiceConsumer_impl::push\n")); for (size_t i = 0; i < events.length (); ++i) { @@ -255,7 +255,7 @@ namespace CIAO RTEventServiceConsumer_impl::disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - //ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventServiceConsumer_impl::disconnect_push_consumer\n")); + ////ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventServiceConsumer_impl::disconnect_push_consumer\n")); PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); this->poa_->deactivate_object (oid); diff --git a/TAO/CIAO/DAnCE/ciao/Container_Base.cpp b/TAO/CIAO/DAnCE/ciao/Container_Base.cpp index bb8be20acf9..c66815ad124 100644 --- a/TAO/CIAO/DAnCE/ciao/Container_Base.cpp +++ b/TAO/CIAO/DAnCE/ciao/Container_Base.cpp @@ -197,13 +197,13 @@ CIAO::Container::push_event ( CORBA::SystemException)) { - ACE_DEBUG ((LM_DEBUG, "CIAO::Container::push_event\n")); + ////ACE_DEBUG ((LM_DEBUG, "CIAO::Container::push_event\n")); CIAO::EventServiceBase * event_service; - ACE_DEBUG ((LM_DEBUG, "Pushing from supplier id: %s\n", connection_id)); + ////ACE_DEBUG ((LM_DEBUG, "Pushing from supplier id: %s\n", connection_id)); if (this->event_service_map_.find (connection_id, event_service) != 0) { - ACE_DEBUG ((LM_DEBUG, "-------------Gosh!!! Invalid Connection! -----------------\n")); + ACE_DEBUG ((LM_DEBUG, "-----------Invalid Connection: %s ----------\n", connection_id)); ACE_THROW (Components::InvalidConnection ()); } -- cgit v1.2.1