Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_3215_Regression / ServerORBInitializer2.cpp
blobbcbbebb7f2d2852f7733af5fd5e8941120627605
1 // -*- C++ -*-
2 #include "ServerORBInitializer2.h"
3 #include "ServerRequest_Interceptor2.h"
4 #include "tao/ORB_Constants.h"
5 #include "tao/Exception.h"
8 Server_ORBInitializer2::Server_ORBInitializer2 (void)
9 : sri_ (0)
13 void
14 Server_ORBInitializer2::pre_init (
15 PortableInterceptor::ORBInitInfo_ptr)
19 void
20 Server_ORBInitializer2::post_init (
21 PortableInterceptor::ORBInitInfo_ptr info)
23 this->register_server_request_interceptors (info);
26 void
27 Server_ORBInitializer2::register_server_request_interceptors (
28 PortableInterceptor::ORBInitInfo_ptr info)
30 TAO249_ServerRequest_Interceptor2 *sri = 0;
31 ACE_NEW_THROW_EX (sri,
32 TAO249_ServerRequest_Interceptor2,
33 CORBA::NO_MEMORY ());
35 PortableInterceptor::ServerRequestInterceptor_var
36 server_interceptor = sri;
37 this->sri_ = sri;
39 info->add_server_request_interceptor (server_interceptor.in ());
42 void
43 Server_ORBInitializer2::set_server_iogr (CORBA::Object_ptr obj)
45 if (this->sri_)
46 this->sri_->server_iogr_ = CORBA::Object::_duplicate (obj);