Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / LoadBalancing / LBPerf / RPS / ORBInitializer.cpp
blob92b419a1ce0e124c054fc8ef3276e18feba4d49f
1 #include "ORBInitializer.h"
2 #include "ServerRequestInterceptor.h"
4 #include "orbsvcs/LoadBalancing/LB_ServerRequestInterceptor.h"
5 #include "orbsvcs/CosLoadBalancingC.h"
7 #include "tao/ORB_Constants.h"
9 ORBInitializer::ORBInitializer ()
10 : load_alert_ (),
11 interceptor_ (0)
15 void
16 ORBInitializer::pre_init (
17 PortableInterceptor::ORBInitInfo_ptr)
21 void
22 ORBInitializer::post_init (
23 PortableInterceptor::ORBInitInfo_ptr info)
25 ACE_NEW_THROW_EX (this->interceptor_,
26 ServerRequestInterceptor,
27 CORBA::NO_MEMORY (
28 CORBA::SystemException::_tao_minor_code (
29 TAO::VMCID,
30 ENOMEM),
31 CORBA::COMPLETED_NO));
33 PortableInterceptor::ServerRequestInterceptor_var sr_interceptor =
34 this->interceptor_;
36 info->add_server_request_interceptor (sr_interceptor.in ());
38 PortableInterceptor::ServerRequestInterceptor_ptr reject_interceptor;
39 ACE_NEW_THROW_EX (reject_interceptor,
40 TAO_LB_ServerRequestInterceptor (this->load_alert_),
41 CORBA::NO_MEMORY (
42 CORBA::SystemException::_tao_minor_code (
43 TAO::VMCID,
44 ENOMEM),
45 CORBA::COMPLETED_NO));
47 PortableInterceptor::ServerRequestInterceptor_var safe_reject_interceptor =
48 reject_interceptor;
50 info->add_server_request_interceptor (safe_reject_interceptor.in ());
54 TAO_LB_LoadAlert &
55 ORBInitializer::load_alert ()
57 return this->load_alert_;
60 ServerRequestInterceptor *
61 ORBInitializer::interceptor () const
63 return this->interceptor_;