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 ()
16 ORBInitializer::pre_init (
17 PortableInterceptor::ORBInitInfo_ptr
)
22 ORBInitializer::post_init (
23 PortableInterceptor::ORBInitInfo_ptr info
)
25 ACE_NEW_THROW_EX (this->interceptor_
,
26 ServerRequestInterceptor
,
28 CORBA::SystemException::_tao_minor_code (
31 CORBA::COMPLETED_NO
));
33 PortableInterceptor::ServerRequestInterceptor_var sr_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_
),
42 CORBA::SystemException::_tao_minor_code (
45 CORBA::COMPLETED_NO
));
47 PortableInterceptor::ServerRequestInterceptor_var safe_reject_interceptor
=
50 info
->add_server_request_interceptor (safe_reject_interceptor
.in ());
55 ORBInitializer::load_alert ()
57 return this->load_alert_
;
60 ServerRequestInterceptor
*
61 ORBInitializer::interceptor () const
63 return this->interceptor_
;