Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Collocated_Forwarding / Server_ORBInitializer.cpp
blob27276d585958238de42152edf2acb9e7bfd8facb
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 (CORBA::ULong request_pass_count)
10 : request_pass_count_ (request_pass_count)
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 (this->request_pass_count_),
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 */