1 #include "ORBInitializer.h"
2 #include "ServerRequestInterceptor.h"
4 #include "orbsvcs/LoadBalancing/LB_ServerRequestInterceptor.h"
6 #include "orbsvcs/CosLoadBalancingC.h"
7 #include "tao/ORB_Constants.h"
9 ORBInitializer::ORBInitializer (void)
16 ORBInitializer::pre_init (
17 PortableInterceptor::ORBInitInfo_ptr
)
22 ORBInitializer::post_init (
23 PortableInterceptor::ORBInitInfo_ptr info
)
26 ACE_NEW_THROW_EX (this->interceptor_
,
27 ServerRequestInterceptor
,
29 CORBA::SystemException::_tao_minor_code (
32 CORBA::COMPLETED_NO
));
34 PortableInterceptor::ServerRequestInterceptor_var sr_interceptor
=
37 info
->add_server_request_interceptor (sr_interceptor
.in ());
39 PortableInterceptor::ServerRequestInterceptor_ptr reject_interceptor
;
40 ACE_NEW_THROW_EX (reject_interceptor
,
41 TAO_LB_ServerRequestInterceptor (this->load_alert_
),
43 CORBA::SystemException::_tao_minor_code (
46 CORBA::COMPLETED_NO
));
48 PortableInterceptor::ServerRequestInterceptor_var safe_reject_interceptor
=
51 info
->add_server_request_interceptor (safe_reject_interceptor
.in ());
56 ORBInitializer::load_alert (void)
58 return this->load_alert_
;
61 ServerRequestInterceptor
*
62 ORBInitializer::interceptor (void) const
64 return this->interceptor_
;