2 #include "tao/DiffServPolicy/DiffServPolicy.h"
3 #include "tao/DiffServPolicy/DiffServPolicy_ORBInitializer.h"
4 #include "tao/DiffServPolicy/DiffServ_Protocols_Hooks.h"
5 #include "tao/ORB_Core.h"
6 #include "tao/ORBInitializer_Registry.h"
9 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
12 TAO_DiffServPolicy_Initializer::static_init ()
14 TAO_ORB_Core::set_network_priority_protocols_hooks (
15 "DS_Network_Priority_Protocols_Hooks");
16 ACE_Service_Config::process_directive (
17 ace_svc_desc_TAO_DS_Network_Priority_Protocols_Hooks
);
18 ACE_Service_Config::process_directive (
19 ace_svc_desc_TAO_DiffServPolicy_Initializer
);
24 TAO_DiffServPolicy_Initializer::init (int, ACE_TCHAR
* [])
26 PortableInterceptor::ORBInitializer_var orb_initializer
;
30 PortableInterceptor::ORBInitializer_ptr temp_orb_initializer
=
31 PortableInterceptor::ORBInitializer::_nil ();
32 /// Register the EndpointPolicy ORBInitializer.
33 ACE_NEW_THROW_EX (temp_orb_initializer
,
34 TAO_DiffServPolicy_ORBInitializer
,
36 CORBA::SystemException::_tao_minor_code (
39 CORBA::COMPLETED_NO
));
41 orb_initializer
= temp_orb_initializer
;
43 PortableInterceptor::register_orb_initializer (orb_initializer
.in ());
45 catch (const ::CORBA::Exception
& ex
)
47 if (TAO_debug_level
> 0)
49 ex
._tao_print_exception ("Caught exception:");
58 /////////////////////////////////////////////////////////////////////
60 ACE_FACTORY_DEFINE (TAO_DiffServPolicy
, TAO_DiffServPolicy_Initializer
)
61 ACE_STATIC_SVC_DEFINE (TAO_DiffServPolicy_Initializer
,
62 ACE_TEXT ("DiffservPolicy_Initializer"),
64 &ACE_SVC_NAME (TAO_DiffServPolicy_Initializer
),
65 ACE_Service_Type::DELETE_THIS
66 | ACE_Service_Type::DELETE_OBJ
,
68 TAO_END_VERSIONED_NAMESPACE_DECL