void TAO_FT_ServerORBInitializer::register_policy_factories ( PortableInterceptor::ORBInitInfo_ptr info) { // Register the FTCORBA policy factories. PortableInterceptor::PolicyFactory_ptr temp_factory = PortableInterceptor::PolicyFactory::_nil (); PortableInterceptor::PolicyFactory_var policy_factory; // This policy factory is used for all FTCORBA related policies. ACE_NEW_THROW_EX (temp_factory, TAO_FT_ServerPolicyFactory, CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); policy_factory = temp_factory; // Bind the same policy factory to all FTCORBA related policy // types since a single policy factory is used to create each of // the different types of FTCORBA policies. CORBA::PolicyType type = FT::HEARTBEAT_ENABLED_POLICY; info->register_policy_factory (type, policy_factory.in ()); }
void TAO_RT_ORBInitializer::register_policy_factories ( PortableInterceptor::ORBInitInfo_ptr info) { // The RTCorba policy factory is stateless and reentrant, so share a // single instance between all ORBs. if (CORBA::is_nil (this->policy_factory_.in ())) { PortableInterceptor::PolicyFactory_ptr policy_factory; ACE_NEW_THROW_EX (policy_factory, TAO_RT_PolicyFactory, CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); this->policy_factory_ = policy_factory; } // Bind the same policy factory to all RTCORBA related policy // types since a single policy factory is used to create each of // the different types of RTCORBA policies. static CORBA::PolicyType const type[] = { RTCORBA::PRIORITY_MODEL_POLICY_TYPE, RTCORBA::THREADPOOL_POLICY_TYPE, RTCORBA::SERVER_PROTOCOL_POLICY_TYPE, RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE, RTCORBA::PRIVATE_CONNECTION_POLICY_TYPE, RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE }; const CORBA::PolicyType *end = type + sizeof (type) / sizeof (type[0]); for (CORBA::PolicyType const * i = type; i != end; ++i) { try { info->register_policy_factory (*i, this->policy_factory_.in ()); } catch (const ::CORBA::BAD_INV_ORDER& ex) { if (ex.minor () == (CORBA::OMGVMCID | 16)) { // The factory is already there, it happens because the // magic initializer in PortableServer.cpp registers // with the ORB multiple times. This is an indication // that we should do no more work in this // ORBInitializer. return; } throw; } } }
void TAO::Security::ORBInitializer::register_policy_factories ( PortableInterceptor::ORBInitInfo_ptr info) { // Register the security policy factories. if (CORBA::is_nil (this->policy_factory_.in ())) { PortableInterceptor::PolicyFactory_ptr policy_factory; ACE_NEW_THROW_EX (policy_factory, TAO::Security::PolicyFactory, CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); this->policy_factory_ = policy_factory; } // Bind the same policy factory to all security related policy // types since a single policy factory is used to create each of // the different types of security policies. CORBA::PolicyType type; type = ::Security::SecQOPPolicy; info->register_policy_factory (type, this->policy_factory_.in ()); type = ::Security::SecMechanismsPolicy; info->register_policy_factory (type, this->policy_factory_.in ()); type = ::Security::SecInvocationCredentialsPolicy; info->register_policy_factory (type, this->policy_factory_.in ()); type = ::Security::SecFeaturePolicy; // Deprecated info->register_policy_factory (type, this->policy_factory_.in ()); type = ::Security::SecDelegationDirectivePolicy; info->register_policy_factory (type, this->policy_factory_.in ()); type = ::Security::SecEstablishTrustPolicy; info->register_policy_factory (type, this->policy_factory_.in ()); type = SecurityLevel3::ContextEstablishmentPolicyType; info->register_policy_factory (type, this->policy_factory_.in ()); type = SecurityLevel3::ObjectCredentialsPolicyType; info->register_policy_factory (type, this->policy_factory_.in ()); // ---------------------------------------------------------------- }