Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / ORB_Shutdown / Server_ORBInitializer.cpp
blob61c9937e9683dcea87b40f89f5a820acb6a7dc75
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 (bool & destroy_called)
11 : destroy_called_ (destroy_called)
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 ACE_NEW_THROW_EX (interceptor,
27 Server_Request_Interceptor (this->destroy_called_),
28 CORBA::NO_MEMORY (
29 CORBA::SystemException::_tao_minor_code (
30 TAO::VMCID,
31 ENOMEM),
32 CORBA::COMPLETED_NO));
34 PortableInterceptor::ServerRequestInterceptor_var server_interceptor =
35 interceptor;
37 info->add_server_request_interceptor (interceptor);
40 #endif /* TAO_HAS_INTERCEPTORS == 1 */