implicit_deactivator.cpp

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 34 行

CPP
34
字号
#include "Implicit_Deactivator.h"
#include "tao/PortableServer/Servant_Base.h"

ACE_RCSID (Utils,
           Implicit_Deactivator,
           "Implicit_Deactivator.cpp,v 1.2 2002/11/02 01:11:22 bala Exp")
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;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?