summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2009-08-05 14:02:07 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2009-08-05 14:02:07 +0000
commit3fedd48a0ed5b79d3945635106f038c2eb905f70 (patch)
tree37d956c56eb5cbce8ab902a2fbad4b9a17dc11f7 /modules
parente455bd1a86f5b8fec97fe4630e54f83fbe1a05b2 (diff)
downloadATCD-3fedd48a0ed5b79d3945635106f038c2eb905f70.tar.gz
Wed Aug 5 14:00:06 UTC 2009 William R. Otte <Wotte@dre.vanderbilt.edu>
Diffstat (limited to 'modules')
-rw-r--r--modules/CIAO/ChangeLog10
-rw-r--r--modules/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp11
-rw-r--r--modules/CIAO/ciao/ComponentServer/CIAO_Container_Impl.cpp38
-rw-r--r--modules/CIAO/ciao/Containers/Session/Session_Container.cpp24
4 files changed, 70 insertions, 13 deletions
diff --git a/modules/CIAO/ChangeLog b/modules/CIAO/ChangeLog
index 2b61228490c..9607d6ad0a9 100644
--- a/modules/CIAO/ChangeLog
+++ b/modules/CIAO/ChangeLog
@@ -1,3 +1,13 @@
+Wed Aug 5 14:00:06 UTC 2009 William R. Otte <Wotte@dre.vanderbilt.edu>
+
+ * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp:
+ * ciao/ComponentServer/CIAO_Container_Impl.cpp:
+ * ciao/Containers/Session/Session_Container.cpp:
+
+ Fixed a couple bugs whereby homed and unhomed components didn't
+ have their end of lifecycle events (passivate/remove) invoked
+ during teardown.
+
Wed Aug 5 08:18:35 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* connectors/dds4ccm/examples/Hello/descriptors/run_receiver.pl:
diff --git a/modules/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp b/modules/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
index a4fbcd940c8..40be1bca281 100644
--- a/modules/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
+++ b/modules/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
@@ -131,14 +131,9 @@ NodeApplicationManager_Impl::destroyApplication (Deployment::Application_ptr app
CORBA::Boolean standalone (false);
val >>= CORBA::Any::to_boolean (standalone);
- if (standalone)
- {
- DANCE_DEBUG ((LM_DEBUG, DLINFO ACE_TEXT("NodeApplicationManager_Impl::destroyApplication - ")
- ACE_TEXT("Acting as a standalone NM, passivating and removing installed components\n")));
-
- this->application_->passivate_components ();
- this->application_->remove_components ();
- }
+
+ this->application_->passivate_components ();
+ this->application_->remove_components ();
}
diff --git a/modules/CIAO/ciao/ComponentServer/CIAO_Container_Impl.cpp b/modules/CIAO/ciao/ComponentServer/CIAO_Container_Impl.cpp
index 7e93197dbb2..0f5e236f524 100644
--- a/modules/CIAO/ciao/ComponentServer/CIAO_Container_Impl.cpp
+++ b/modules/CIAO/ciao/ComponentServer/CIAO_Container_Impl.cpp
@@ -178,15 +178,47 @@ namespace CIAO
"Unable to bind componnet into component map\n"));
}
-
return comp._retn ();
}
void
- CIAO_Container_i::remove_component (::Components::CCMObject_ptr /*cref*/)
+ CIAO_Container_i::remove_component (::Components::CCMObject_ptr cref)
{
CIAO_TRACE("CIAO_Container_i::remove_component");
- throw CORBA::NO_IMPLEMENT ();
+
+ Component_Iterator i = this->component_map_.begin ();
+ while (!i.done ())
+ {
+ if (i->item ()->_is_equivalent (cref))
+ {
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO_Container_i::remove_component - "
+ "Successfully found matching component\n"));
+ break;
+ }
+ i.advance ();
+ }
+
+ if (i.done ())
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "CIAO_Container_i::remove_component - "
+ "Unable to find matching component managed by this container, throwing RemoveFailure\n"));
+ throw Components::RemoveFailure ();
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO_Container_i::remove_component - "
+ "Invoking remove on the container impl for component %C.\n",
+ i->key ().c_str ()));
+ this->container_->uninstall_component (cref);
+ CIAO_DEBUG ((LM_INFO, CLINFO "CIAO_Container_i::remove_component - "
+ "Successfully removed component %C\n",
+ i->key ().c_str ()));
+
+ if (this->component_map_.unbind (i->key ()) != 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "CIAO_Container_i::remove_component - "
+ "Unable to unbind removed component with id %C from component map\n",
+ i->key ().c_str ()));
+ }
}
::Components::CCMObjectSeq *
diff --git a/modules/CIAO/ciao/Containers/Session/Session_Container.cpp b/modules/CIAO/ciao/Containers/Session/Session_Container.cpp
index 840e0c5e972..0354899dffb 100644
--- a/modules/CIAO/ciao/Containers/Session/Session_Container.cpp
+++ b/modules/CIAO/ciao/Containers/Session/Session_Container.cpp
@@ -789,8 +789,28 @@ namespace CIAO
Session_Container::uninstall_component (Components::CCMObject_ptr homeref)
{
CIAO_TRACE ("Session_Container::uninstall_component");
-
- this->uninstall (homeref, Container_Types::COMPONENT_t);
+
+ PortableServer::Servant svnt = this->component_poa_->reference_to_servant (homeref);
+
+ if (svnt == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "Session_Container::uninstall_component - "
+ "Unable to convert provided CCMObject reference to Servant."));
+ throw ::Components::RemoveFailure ();
+ }
+
+ CIAO::Servant_Impl_Base * svt = dynamic_cast < CIAO::Servant_Impl_Base * > (svnt);
+
+ if (svt == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "Session_Container::uninstall_component - "
+ "Unable to convert provided servant reference to servant implementation."));
+ throw ::Components::RemoveFailure ();
+ }
+
+ svt->remove ();
+
+ //this->uninstall (homeref, Container_Types::COMPONENT_t);
}
void