diff options
author | dengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-01-24 21:45:34 +0000 |
---|---|---|
committer | dengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-01-24 21:45:34 +0000 |
commit | 072a24ad9ac63d34eed0f8ed749344a655e913d1 (patch) | |
tree | c1a51ce1f4c35dde5b413e46b694bd913b5511c3 | |
parent | 6ea146a260ce475aa80f346ecdc15778ba54f12a (diff) | |
download | ATCD-072a24ad9ac63d34eed0f8ed749344a655e913d1.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp index e30ff5b6773..e4750ad28e9 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp @@ -499,12 +499,27 @@ destroyApplication (Deployment::Application_ptr app if (CORBA::is_nil (this->nodeapp_.in () )) ACE_THROW (Deployment::StopError ()); - // If there are no shared components within this NAM, then kill the NA - - // Otherwise, only remove those components from the NA + // Iterate over all the components within this NAM, and if it's + // not a shared component, then remove it. If all the components + // are removed, then we shall kill the NA totally. + bool kill_node_app = true; + for (CORBA::ULong i = 0; i < this->plan_.instance.length (); ++i) + { + ACE_CString name = plan_.instance[i].name.in (); + if (this->is_shared_component (name)) + { + kill_node_app = false; + continue; + } - this->nodeapp_->remove (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->nodeapp_->remove_component (name.c_str ()); + } + + if (kill_node_app) + { + this->nodeapp_->remove (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } printf("Exiting NAM_Impl::destroyApplication\n"); return; |