diff options
Diffstat (limited to 'TAO/tao/Utils/Implicit_Deactivator.cpp')
-rw-r--r-- | TAO/tao/Utils/Implicit_Deactivator.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/TAO/tao/Utils/Implicit_Deactivator.cpp b/TAO/tao/Utils/Implicit_Deactivator.cpp new file mode 100644 index 00000000000..1cdb4fc3087 --- /dev/null +++ b/TAO/tao/Utils/Implicit_Deactivator.cpp @@ -0,0 +1,29 @@ +#include "tao/Utils/Implicit_Deactivator.h" +#include "tao/PortableServer/Servant_Base.h" + +ACE_RCSID (Utils, + Implicit_Deactivator, + "$Id$") + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +void +TAO::Utils::Implicit_Deactivation_Functor::operator () ( + PortableServer::ServantBase * servant) throw () +{ + + try + { + PortableServer::POA_var poa (servant->_default_POA ()); + + PortableServer::ObjectId_var id (poa->servant_to_id (servant)); + + poa->deactivate_object (id.in()); + } + catch (...) + { + // @@ Cannot let exceptions escape, yet we need to log them! + } +} + +TAO_END_VERSIONED_NAMESPACE_DECL |