Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_2248_Regression / Server_ORBInitializer.cpp
blob4472202635c3afb1243857572f78fa74b36fa4e9
1 // -*- C++ -*-
2 #include "Server_ORBInitializer.h"
3 #include "tao/ORB_Constants.h"
5 #if TAO_HAS_INTERCEPTORS == 1
7 #include "Server_Request_Interceptor.h"
9 Server_ORBInitializer::Server_ORBInitializer ()
10 : server_interceptor_ ()
14 void
15 Server_ORBInitializer::pre_init (
16 PortableInterceptor::ORBInitInfo_ptr)
20 void
21 Server_ORBInitializer::post_init (
22 PortableInterceptor::ORBInitInfo_ptr info)
24 PortableInterceptor::ServerRequestInterceptor_ptr interceptor;
25 // Install the server request interceptor.
26 ACE_NEW_THROW_EX (interceptor,
27 Server_Request_Interceptor,
28 CORBA::NO_MEMORY (
29 CORBA::SystemException::_tao_minor_code (
30 TAO::VMCID,
31 ENOMEM),
32 CORBA::COMPLETED_NO));
34 this->server_interceptor_ = interceptor;
36 info->add_server_request_interceptor (interceptor);
39 PortableInterceptor::ServerRequestInterceptor_ptr
40 Server_ORBInitializer::server_interceptor ()
42 return
43 PortableInterceptor::ServerRequestInterceptor::_duplicate (
44 this->server_interceptor_.in ());
47 #endif /* TAO_HAS_INTERCEPTORS == 1 */