Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_2248_Regression / Server_ORBInitializer.cpp
blobab461eda26e7ab41c9ea3bb71787f55b8f3995f0
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 (void)
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 (void)
42 return
43 PortableInterceptor::ServerRequestInterceptor::_duplicate (
44 this->server_interceptor_.in ());
47 #endif /* TAO_HAS_INTERCEPTORS == 1 */