void FOO_IORInterceptor_ORBInitializer::post_init ( PortableInterceptor::ORBInitInfo_ptr info) { IOP::CodecFactory_var codec_factory = info->codec_factory (); // Set up a structure that contains information necessary to // create a GIOP 1.2 CDR encapsulation Codec. IOP::Encoding encoding; encoding.format = IOP::ENCODING_CDR_ENCAPS; encoding.major_version = 1; encoding.minor_version = 2; // Obtain the CDR encapsulation Codec. IOP::Codec_var codec = codec_factory->create_codec (encoding); PortableInterceptor::IORInterceptor_ptr foo; ACE_NEW_THROW_EX (foo, FOO_IORInterceptor (codec.in ()), CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); PortableInterceptor::IORInterceptor_var ior_interceptor = foo; info->add_ior_interceptor (ior_interceptor.in ()); }
void ServerORBInitializer::post_init ( PortableInterceptor::ORBInitInfo_ptr info) { CORBA::Object_var obj = info->resolve_initial_references ("POACurrent"); PortableServer::Current_var poa_current = PortableServer::Current::_narrow (obj.in ()); ACE_ASSERT (!CORBA::is_nil (poa_current.in ())); CORBA::String_var orb_id = info->orb_id (); // Create and register the test's ServerRequestInterceptor PortableInterceptor::ServerRequestInterceptor_ptr tmp; ACE_NEW_THROW_EX (tmp, ServerRequestInterceptor (orb_id.in (), poa_current.in ()), CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); PortableInterceptor::ServerRequestInterceptor_var server_interceptor = tmp; info->add_server_request_interceptor (server_interceptor.in ()); // Create and register the test's IORInterceptor PortableInterceptor::IORInterceptor_ptr ort_test_interceptor; ACE_NEW_THROW_EX (ort_test_interceptor, ORT_test_IORInterceptor, CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); PortableInterceptor::IORInterceptor_var ior_interceptor = ort_test_interceptor; info->add_ior_interceptor (ior_interceptor.in ()); }
void ServerInitializer::post_init ( PortableInterceptor::ORBInitInfo_ptr info) { // get reference to the codec_factory IOP::CodecFactory_var codec_factory = info->codec_factory(); // Create and register the request interceptors. PortableInterceptor::ServerRequestInterceptor_var si = new ServerInterceptor (codec_factory); info->add_server_request_interceptor (si.in()); // add IOR Interceptor PortableInterceptor::IORInterceptor_var iori = new ServerIORInterceptor; info->add_ior_interceptor (iori.in()); }
void TAO_LB_ORBInitializer::post_init ( PortableInterceptor::ORBInitInfo_ptr info) { CORBA::Object_var obj = info->resolve_initial_references ("LoadManager"); CosLoadBalancing::LoadManager_var lm = CosLoadBalancing::LoadManager::_narrow (obj.in ()); CORBA::String_var orbid = info->orb_id (); PortableInterceptor::IORInterceptor_ptr tmp; ACE_NEW_THROW_EX (tmp, TAO_LB_IORInterceptor (this->object_groups_, this->repository_ids_, this->location_.in (), lm.in (), orbid.in (), this->load_alert_), CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); PortableInterceptor::IORInterceptor_var ior_interceptor = tmp; info->add_ior_interceptor (ior_interceptor.in ()); // ---------------- PortableInterceptor::ServerRequestInterceptor_ptr sri; ACE_NEW_THROW_EX (sri, TAO_LB_ServerRequestInterceptor (this->load_alert_), CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); PortableInterceptor::ServerRequestInterceptor_var sr_interceptor = sri; info->add_server_request_interceptor (sr_interceptor.in ()); }