diff options
Diffstat (limited to 'TAO/tao/Utils/Implicit_Deactivator.cpp')
-rw-r--r-- | TAO/tao/Utils/Implicit_Deactivator.cpp | 38 |
1 files changed, 38 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..9e0fb6444f9 --- /dev/null +++ b/TAO/tao/Utils/Implicit_Deactivator.cpp @@ -0,0 +1,38 @@ +#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) + ACE_THROW_SPEC (()) +{ + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY + { + PortableServer::POA_var poa (servant->_default_POA ( + ACE_ENV_SINGLE_ARG_PARAMETER)); + ACE_TRY_CHECK; + + PortableServer::ObjectId_var id (poa->servant_to_id (servant + ACE_ENV_ARG_PARAMETER)); + ACE_TRY_CHECK; + + poa->deactivate_object (id.in() + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHALL + { + // @@ Cannot let exceptions escape, yet we need to log them! + } + ACE_ENDTRY; +} + +TAO_END_VERSIONED_NAMESPACE_DECL |