From 66793900fd5b385d7d0c5142a5b613a0355b32a0 Mon Sep 17 00:00:00 2001 From: bala Date: Thu, 16 Oct 2003 16:34:00 +0000 Subject: ChangeLogTag:Thu Oct 16 11:31:45 2003 Balachandran Natarajan --- TAO/ChangeLog_ref | 13 ++++++++++ TAO/tao/LocateRequest_Invocation_Adapter.cpp | 4 ++++ TAO/tao/Object.cpp | 3 +-- .../RTCORBA/RT_Invocation_Endpoint_Selectors.cpp | 28 ++++++++++++++++++---- TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.h | 8 +++---- 5 files changed, 45 insertions(+), 11 deletions(-) diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index f3def441c75..9357e7605f3 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,16 @@ +Thu Oct 16 11:31:45 2003 Balachandran Natarajan + + * tao/LocateRequest_Invocation_Adapter.cpp: Initialize the + inconsistent policy list before making an invocation. + + * tao/Object.cpp: Cosmetic fix. + + * tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp: + * tao/RTCORBA/RT_Invocation_Endpoint_Selectors.h: No reason for + this class to inherit from Default_Selectors. Just removed the + cpuipling and made this class inherit from the root base of the + invocation endpoint selectors. + Thu Oct 16 09:37:25 2003 Balachandran Natarajan * tao/Messaging/Asynch_Invocation_Adapter.cpp: diff --git a/TAO/tao/LocateRequest_Invocation_Adapter.cpp b/TAO/tao/LocateRequest_Invocation_Adapter.cpp index 2ef9174bbb4..69c4e8c5b24 100644 --- a/TAO/tao/LocateRequest_Invocation_Adapter.cpp +++ b/TAO/tao/LocateRequest_Invocation_Adapter.cpp @@ -55,6 +55,10 @@ namespace TAO ACE_TRY { + resolver.init_inconsistent_policies ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + resolver.resolve (max_wait_time ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index bb3cf710f2f..5690f5f73c3 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -576,8 +576,7 @@ CORBA::Object::_validate_connection ( if (this->is_collocated_) return !(this->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER)); - TAO::LocateRequest_Invocation_Adapter tao_call ( - this); + TAO::LocateRequest_Invocation_Adapter tao_call (this); ACE_TRY { tao_call.invoke (ACE_ENV_SINGLE_ARG_PARAMETER); diff --git a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp index e5ad6ca69af..5bb24d15730 100644 --- a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp +++ b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp @@ -46,11 +46,25 @@ TAO_RT_Invocation_Endpoint_Selector::select_endpoint ( if (client_protocol_policy_base.ptr () == 0) { - this->TAO_Default_Endpoint_Selector::select_endpoint ( - r, - val - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + do + { + r->profile (r->stub ()->profile_in_use ()); + + int status = + this->endpoint_from_profile (*r, + val + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (status == 1) + return; + } + while (r->stub ()->next_profile_retry () != 0); + + // If we get here, we completely failed to find an endpoint selector + // that we know how to use, so throw an exception. + ACE_THROW (CORBA::TRANSIENT (CORBA::OMGVMCID | 2, + CORBA::COMPLETED_NO)); } else { @@ -195,6 +209,7 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( // If the priority model policy is not set. if (priority_model_policy.ptr () == 0) { + // Bands without priority model do not make sense. if (bands_policy.ptr () != 0) { @@ -256,6 +271,7 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( // If there are no bands. if (bands_policy.ptr () == 0) { + // Match the priority of the client thread with the // endpoint. match_priority = 1; @@ -263,6 +279,7 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( // There are bands. else { + // Check which band range we fall in. int in_range = 0; protocol_hooks->get_selector_bands_policy_hook ( @@ -277,6 +294,7 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( { if (r.inconsistent_policies ()) { + CORBA::PolicyList *p = r.inconsistent_policies (); p->length (2); diff --git a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.h b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.h index 28d2c558670..1cf043c8482 100644 --- a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.h +++ b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.h @@ -47,13 +47,13 @@ class TAO_Endpoint; * **/ class TAO_RTCORBA_Export TAO_RT_Invocation_Endpoint_Selector : - public TAO_Default_Endpoint_Selector + public TAO_Invocation_Endpoint_Selector { public: - void select_endpoint (TAO::Profile_Transport_Resolver *r, - ACE_Time_Value *val - ACE_ENV_ARG_DECL); + virtual void select_endpoint (TAO::Profile_Transport_Resolver *r, + ACE_Time_Value *val + ACE_ENV_ARG_DECL); protected: void select_endpoint_based_on_client_protocol_policy ( -- cgit v1.2.1