Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Dynamic / Echo_Server_ORBInitializer.cpp
blob3d16645c0a9a85b4ed9005b131d2f48e05fb2c4f
1 // -*- C++ -*-
2 #include "Echo_Server_ORBInitializer.h"
4 #if TAO_HAS_INTERCEPTORS == 1
6 #include "server_interceptor.h"
8 Echo_Server_ORBInitializer::Echo_Server_ORBInitializer (int& result) : result_ (result)
12 void
13 Echo_Server_ORBInitializer::pre_init (
14 PortableInterceptor::ORBInitInfo_ptr)
18 void
19 Echo_Server_ORBInitializer::post_init (
20 PortableInterceptor::ORBInitInfo_ptr info)
22 PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
23 PortableInterceptor::ServerRequestInterceptor::_nil ();
25 // Install the Echo server request interceptor
26 ACE_NEW_THROW_EX (interceptor,
27 Echo_Server_Request_Interceptor (this->result_),
28 CORBA::NO_MEMORY ());
30 PortableInterceptor::ServerRequestInterceptor_var
31 server_interceptor = interceptor;
33 info->add_server_request_interceptor (server_interceptor.in ());
36 #endif /* TAO_HAS_INTERCEPTORS == 1 */