Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_2615_Regression / ServerRequest_Interceptor2.cpp
blob8edbe6159429fa575d11e7a94e259f3d3fc50498
1 // -*- C++ -*-
2 #include "ServerRequest_Interceptor2.h"
3 #include "orbsvcs/FT_CORBA_ORBC.h"
4 #include "tao/IOPC.h"
5 #include "tao/ORB_Constants.h"
6 #include "tao/AnyTypeCode/DynamicC.h"
7 #include "tao/AnyTypeCode/TypeCode.h"
8 #include "tao/CDR.h"
9 #include "ace/Log_Msg.h"
10 #include "ace/OS_NS_string.h"
11 #include "ace/OS_NS_stdio.h"
12 #include "ace/OS_NS_unistd.h"
13 #include "Hello.h"
14 #include "ace/OS_NS_sys_time.h"
15 #include "tao/PI/PIForwardRequestC.h"
17 CORBA::Boolean
18 ServerRequest_Interceptor2::has_ft_request_sc_ = false;
20 ServerRequest_Interceptor2::ServerRequest_Interceptor2 ()
21 : orb_ (0)
25 ServerRequest_Interceptor2::~ServerRequest_Interceptor2 ()
29 char *
30 ServerRequest_Interceptor2::name ()
32 return CORBA::string_dup ("ServerRequest_Interceptor2");
35 void
36 ServerRequest_Interceptor2::destroy ()
40 void
41 ServerRequest_Interceptor2::receive_request_service_contexts (
42 PortableInterceptor::ServerRequestInfo_ptr)
46 void
47 ServerRequest_Interceptor2::receive_request (
48 PortableInterceptor::ServerRequestInfo_ptr ri)
50 CORBA::String_var op = ri->operation ();
52 if (ACE_OS::strcmp (op.in (), "has_ft_request_service_context"))
54 // bail if not the op we are interested in -
55 // avoid excess spurious error clutter when client calls ::shutdown; ::ping etc..
56 return;
59 try
61 IOP::ServiceContext_var sc =
62 ri->get_request_service_context (IOP::FT_REQUEST);
64 // No exception therefore there was a context
65 has_ft_request_sc_ = true;
67 catch (const CORBA::BAD_PARAM& ex)
69 ACE_UNUSED_ARG (ex);
70 // No group version context
71 has_ft_request_sc_ = false;
73 catch (const CORBA::Exception&)
75 throw;
79 void
80 ServerRequest_Interceptor2::send_reply (
81 PortableInterceptor::ServerRequestInfo_ptr)
85 void
86 ServerRequest_Interceptor2::send_exception (
87 PortableInterceptor::ServerRequestInfo_ptr)
91 void
92 ServerRequest_Interceptor2::send_other (
93 PortableInterceptor::ServerRequestInfo_ptr)