Ejemplo n.º 1
0
CORBA::Policy_ptr
TAO_IORInfo::get_effective_policy (CORBA::PolicyType type)
{
  this->check_validity ();

  CORBA::Policy_var policy =
    this->poa_->get_policy (type);

  if (!CORBA::is_nil (policy.in ()))
    {
      return policy._retn ();
    }

  // TODO: Now check the global ORB policies.
  // ........

  // No policy matching the given PolicyType was found.
  throw ::CORBA::INV_POLICY (CORBA::OMGVMCID | 3, CORBA::COMPLETED_NO);
}
Ejemplo n.º 2
0
CORBA::Policy_ptr
TAO_Stub::get_cached_policy (TAO_Cached_Policy_Type type)
{
  // No need to lock, the stub only changes its policies at
  // construction time...

  CORBA::Policy_var result;
  if (this->policies_ != 0)
    {
      result = this->policies_->get_cached_policy (type);
    }

  if (CORBA::is_nil (result.in ()))
    {
      result = this->orb_core_->get_cached_policy_including_current (type);
    }

  return result._retn ();
}