1 #include "server_interceptor.h"
2 #include "tao/OctetSeqC.h"
4 #include "ace/Log_Msg.h"
5 #include "ace/OS_NS_string.h"
7 Ping_Death_Request_Interceptor::Ping_Death_Request_Interceptor (int *counter
)
8 : myname_ ("Ping_Death_Interceptor"),
10 poa_ (PortableServer::POA::_nil())
14 Ping_Death_Request_Interceptor::~Ping_Death_Request_Interceptor ()
19 Ping_Death_Request_Interceptor::set_poa (PortableServer::POA_ptr poa
)
21 poa_
= PortableServer::POA::_duplicate (poa
);
25 Ping_Death_Request_Interceptor::name ()
27 return CORBA::string_dup (this->myname_
);
31 Ping_Death_Request_Interceptor::destroy ()
36 Ping_Death_Request_Interceptor::receive_request_service_contexts (
37 PortableInterceptor::ServerRequestInfo_ptr ri
)
39 CORBA::String_var operation
= ri
->operation ();
41 if (ACE_OS::strcmp (operation
.in(), "ping") != 0)
46 if (this->counter_
!= 0)
50 if (CORBA::is_nil(this->poa_
.in()))
56 this->poa_
->destroy (1,1);
58 catch (const CORBA::Exception
&ex
)
60 ACE_DEBUG ((LM_DEBUG
, "(%P) deactivate raised %C\n",
63 throw ::CORBA::TRANSIENT
64 ( CORBA::SystemException::_tao_minor_code (TAO_POA_HOLDING
, 1),
69 Ping_Death_Request_Interceptor::receive_request (
70 PortableInterceptor::ServerRequestInfo_ptr
)
76 Ping_Death_Request_Interceptor::send_reply (
77 PortableInterceptor::ServerRequestInfo_ptr
)
83 Ping_Death_Request_Interceptor::send_exception (
84 PortableInterceptor::ServerRequestInfo_ptr
)
90 Ping_Death_Request_Interceptor::send_other (
91 PortableInterceptor::ServerRequestInfo_ptr
)