2 #include "tao/EndpointPolicy/EndpointPolicy.h"
3 #include "tao/EndpointPolicy/EndpointPolicy_ORBInitializer.h"
4 #include "tao/EndpointPolicy/Endpoint_Acceptor_Filter_Factory.h"
6 #include "tao/ORB_Core.h"
7 #include "tao/ORBInitializer_Registry.h"
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 TAO_EndpointPolicy_Initializer::static_init ()
16 ACE_Service_Config::process_directive (ace_svc_desc_TAO_EndpointPolicy_Initializer
);
21 TAO_EndpointPolicy_Initializer::init (int, ACE_TCHAR
* [])
23 PortableInterceptor::ORBInitializer_var orb_initializer
;
27 PortableInterceptor::ORBInitializer_ptr temp_orb_initializer
=
28 PortableInterceptor::ORBInitializer::_nil ();
30 /// Register the EndpointPolicy ORBInitializer.
31 ACE_NEW_THROW_EX (temp_orb_initializer
,
32 TAO_EndpointPolicy_ORBInitializer
,
34 CORBA::SystemException::_tao_minor_code (
37 CORBA::COMPLETED_NO
));
39 orb_initializer
= temp_orb_initializer
;
41 PortableInterceptor::register_orb_initializer (orb_initializer
.in ());
43 catch (const ::CORBA::Exception
& ex
)
45 if (TAO_debug_level
> 0)
47 ex
._tao_print_exception ("Caught exception:");
52 ACE_Service_Config::process_directive
53 (ace_svc_desc_TAO_Endpoint_Acceptor_Filter_Factory
,1); // force replacement
59 /////////////////////////////////////////////////////////////////////
61 ACE_FACTORY_DEFINE (TAO_EndpointPolicy
, TAO_EndpointPolicy_Initializer
)
62 ACE_STATIC_SVC_DEFINE (TAO_EndpointPolicy_Initializer
,
63 ACE_TEXT ("EndpointPolicy_Initializer"),
65 &ACE_SVC_NAME (TAO_EndpointPolicy_Initializer
),
66 ACE_Service_Type::DELETE_THIS
67 | ACE_Service_Type::DELETE_OBJ
,
69 TAO_END_VERSIONED_NAMESPACE_DECL