1 #include "Server_IORInterceptor_ORBInitializer.h"
2 #include "Server_IORInterceptor.h"
3 #include "tao/ORB_Constants.h"
8 Server_IORInterceptor_ORBInitializer::pre_init (
9 PortableInterceptor::ORBInitInfo_ptr
/* info */
15 Server_IORInterceptor_ORBInitializer::post_init (
16 PortableInterceptor::ORBInitInfo_ptr info
)
18 CORBA::Object_var obj
=
19 info
->resolve_initial_references ("Gateway_Object_Factory");
21 /// Narrow it down correctly.
22 Gateway::Object_Factory_var gateway_object_factory
=
23 Gateway::Object_Factory::_narrow (obj
.in ());
25 /// Check for nil reference
26 if (CORBA::is_nil (gateway_object_factory
.in ()))
28 "Unable to obtain reference to Gateway::Object_Factory "
31 PortableInterceptor::IORInterceptor_ptr gateway
;
32 ACE_NEW_THROW_EX (gateway
,
33 Server_IORInterceptor (gateway_object_factory
.in ()),
35 CORBA::SystemException::_tao_minor_code (
38 CORBA::COMPLETED_NO
));
40 PortableInterceptor::IORInterceptor_var ior_interceptor
= gateway
;
42 info
->add_ior_interceptor (ior_interceptor
.in ());