Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / ForwardRequest / Server_ORBInitializer.cpp
blob8ee1d22830c203f2dc04f48d397b9bb4f8f1a96e
1 // -*- C++ -*-
2 #include "Server_ORBInitializer.h"
4 #if TAO_HAS_INTERCEPTORS == 1
6 #include "Server_Request_Interceptor.h"
8 #include "tao/ORB_Constants.h"
10 Server_ORBInitializer::Server_ORBInitializer ()
11 : server_interceptor_ ()
15 void
16 Server_ORBInitializer::pre_init (
17 PortableInterceptor::ORBInitInfo_ptr)
21 void
22 Server_ORBInitializer::post_init (
23 PortableInterceptor::ORBInitInfo_ptr info)
25 PortableInterceptor::ServerRequestInterceptor_ptr interceptor;
26 // Install the server request interceptor.
27 ACE_NEW_THROW_EX (interceptor,
28 Server_Request_Interceptor,
29 CORBA::NO_MEMORY (
30 CORBA::SystemException::_tao_minor_code (
31 TAO::VMCID,
32 ENOMEM),
33 CORBA::COMPLETED_NO));
35 this->server_interceptor_ = interceptor;
37 info->add_server_request_interceptor (interceptor);
40 PortableInterceptor::ServerRequestInterceptor_ptr
41 Server_ORBInitializer::server_interceptor ()
43 return
44 PortableInterceptor::ServerRequestInterceptor::_duplicate (
45 this->server_interceptor_.in ());
48 #endif /* TAO_HAS_INTERCEPTORS == 1 */