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 (CORBA::ULong request_pass_count
)
10 : request_pass_count_ (request_pass_count
)
11 , server_interceptor_ ()
16 Server_ORBInitializer::pre_init (
17 PortableInterceptor::ORBInitInfo_ptr
)
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 (this->request_pass_count_
),
30 CORBA::SystemException::_tao_minor_code (
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 ()
44 PortableInterceptor::ServerRequestInterceptor::_duplicate (
45 this->server_interceptor_
.in ());
48 #endif /* TAO_HAS_INTERCEPTORS == 1 */