Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / ImplRepo / ping_interrupt / server_interceptor.cpp
blobd8031c078155fa4c221b400da73e22c40319fbed
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"),
9 counter_ (counter),
10 poa_ (PortableServer::POA::_nil())
14 Ping_Death_Request_Interceptor::~Ping_Death_Request_Interceptor ()
18 void
19 Ping_Death_Request_Interceptor::set_poa (PortableServer::POA_ptr poa)
21 poa_ = PortableServer::POA::_duplicate (poa);
24 char *
25 Ping_Death_Request_Interceptor::name ()
27 return CORBA::string_dup (this->myname_);
30 void
31 Ping_Death_Request_Interceptor::destroy ()
35 void
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)
43 return;
46 if (this->counter_ != 0)
48 ++(*counter_);
50 if (CORBA::is_nil(this->poa_.in()))
52 return;
54 try
56 this->poa_->destroy (1,1);
58 catch (const CORBA::Exception &ex)
60 ACE_DEBUG ((LM_DEBUG, "(%P) deactivate raised %C\n",
61 ex._name()));
63 throw ::CORBA::TRANSIENT
64 ( CORBA::SystemException::_tao_minor_code (TAO_POA_HOLDING, 1),
65 CORBA::COMPLETED_NO);
68 void
69 Ping_Death_Request_Interceptor::receive_request (
70 PortableInterceptor::ServerRequestInfo_ptr)
72 // Do nothing
75 void
76 Ping_Death_Request_Interceptor::send_reply (
77 PortableInterceptor::ServerRequestInfo_ptr)
79 // Do Nothing
82 void
83 Ping_Death_Request_Interceptor::send_exception (
84 PortableInterceptor::ServerRequestInfo_ptr)
86 // Do Nothing
89 void
90 Ping_Death_Request_Interceptor::send_other (
91 PortableInterceptor::ServerRequestInfo_ptr)
93 // Do Nothing