diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2005-06-30 16:58:14 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2005-06-30 16:58:14 +0000 |
commit | ff5630e607657480312844a67ce7d4d077b740ea (patch) | |
tree | 704ea05963c7c0f61c4edd2c53f8fe4f1632eaf6 | |
parent | 5ecc09d1f2f247689cdadb0dd97f9362c2ed7e0c (diff) | |
download | ATCD-ff5630e607657480312844a67ce7d4d077b740ea.tar.gz |
ChangeLog tag: Thu Jun 30 09:50:46 2005 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 32 | ||||
-rw-r--r-- | TAO/tao/IIOP_Profile.cpp | 21 | ||||
-rw-r--r-- | TAO/tao/IIOP_Profile.h | 7 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Default_Acceptor_Filter.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Profile.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Profile.h | 8 | ||||
-rw-r--r-- | TAO/tao/params.cpp | 2 | ||||
-rwxr-xr-x | TAO/tests/AlternateIIOP/run_test.pl | 2 |
8 files changed, 69 insertions, 17 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index abe6da0deaf..8be824e6f5b 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,35 @@ +Thu Jun 30 09:50:46 2005 Phil Mesnier <mesnier_p@ociweb.com> + + * tao/IIOP_Profile.cpp: + * tao/IIOP_Profile.h: + * tao/Profile.cpp: + * tao/Profile.h: + * tao/PortableServer/Default_Acceptor_Filter.cpp: + This restores the behavior of IIOP_Profile::encode_endpoints so + that it always creates only TAO_TAG_ENDPOINT component. + Initially, the new TAG_ALTERNATE_IIOP_ADDRESS support was added + to this method, with an internal test if the endpoint priority + was TAO_INVALID_PRIORITY or not. If it was not, both kinds of + tagged components were created, if the priority was invalid, + only the new tagged component was created. But this causes + trouble for RT_CORBA with multiple nics. It also generates + redundant components. + + A new method, encode_alternate_endpoints is added to support the + generation of combined endpoints in non-RT ORBs. This new method + is called from Default_Acceptor_Filter.cpp. The base TAO_Profile + supplies a null implementation of encode_alternate_endpoints so + that existing, non-IIOP profiles don't have to be altered. + + * tao/params.cpp: + To address the issue raised by bugzilla #2173, I've set the + default for using shared profiles (non-RT) to 0. This avoids a + side-effect of making shared profiles with endpoints that do not + have a priority set in an RT environment. + + * tests/AlternateIIOP/run_test.pl: + Add an explicit -ORBUseSharedProfile 1 to the server. + Thu Jun 30 09:29:56 2005 Gary Maxey <gary.maxey@hp.com> * tao/Valuetype/StringValueC.inl diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index 56107a40d14..844b9601ef6 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -387,21 +387,11 @@ TAO_IIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const } int -TAO_IIOP_Profile::encode_endpoints (void) +TAO_IIOP_Profile::encode_alternate_endpoints (void) { - // Create a data structure and fill it with endpoint info for wire - // transfer both for RT requests and non-RT. - const TAO_IIOP_Endpoint *endpoint = &this->endpoint_; - - if (endpoint->priority () != TAO_INVALID_PRIORITY) - { - // RT requests - if (this->encode_endpoints_for_rt () == -1) - return -1; - } - - // encode IOP::TAG_ALTERNATE_IIOP_ADDRESS tag if there are more + // encode IOP::TAG_ALTERNATE_IIOP_ADDRESS tags if there are more // than one endpoints to listen to. + const TAO_IIOP_Endpoint *endpoint = &this->endpoint_; for (CORBA::ULong i = 1; i < this->count_; ++i) @@ -411,6 +401,9 @@ TAO_IIOP_Profile::encode_endpoints (void) // endpoint for TAG_ALTERNATE_IIOP_ADDRESS endpoint = endpoint->next_; + if (!endpoint->is_encodable_) + continue; + // Encode the data structure. - The CORBA specification does not // mandate a particular container for the endpoints, only that // it is encoded as host first, then port. @@ -449,7 +442,7 @@ TAO_IIOP_Profile::encode_endpoints (void) } int -TAO_IIOP_Profile::encode_endpoints_for_rt (void) +TAO_IIOP_Profile::encode_endpoints (void) { CORBA::ULong actual_count = 0; diff --git a/TAO/tao/IIOP_Profile.h b/TAO/tao/IIOP_Profile.h index 03de4e55624..cf3bf2880a2 100644 --- a/TAO/tao/IIOP_Profile.h +++ b/TAO/tao/IIOP_Profile.h @@ -72,7 +72,14 @@ public: /// Template methods. Please see Profile.h for documentation. virtual char * to_string (ACE_ENV_SINGLE_ARG_DECL); + + /// Encode endpoints for RT profiles, using a single TAO_TAG_ENDPOINT + /// component. virtual int encode_endpoints (void); + + /// Encode alternate endpoints for non-RT profiles, using multiple + /// TAG_ALTERNATE_IIOP_ADDRESS components, one endpoint per component + virtual int encode_alternate_endpoints (void); virtual TAO_Endpoint *endpoint (void); virtual CORBA::ULong endpoint_count (void) const; virtual CORBA::ULong hash (CORBA::ULong max diff --git a/TAO/tao/PortableServer/Default_Acceptor_Filter.cpp b/TAO/tao/PortableServer/Default_Acceptor_Filter.cpp index 6f659c0f6d8..6a054ee480f 100644 --- a/TAO/tao/PortableServer/Default_Acceptor_Filter.cpp +++ b/TAO/tao/PortableServer/Default_Acceptor_Filter.cpp @@ -45,7 +45,7 @@ TAO_Default_Acceptor_Filter::encode_endpoints (TAO_MProfile &mprofile) ++i) { TAO_Profile *profile = mprofile.get_profile (i); - if (profile->encode_endpoints () == -1) + if (profile->encode_alternate_endpoints () == -1) return -1; } diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp index 38cba8b9114..784b411205a 100644 --- a/TAO/tao/Profile.cpp +++ b/TAO/tao/Profile.cpp @@ -736,6 +736,18 @@ TAO_Profile::hash_service_i (CORBA::ULong m) return this->orb_core_->hash_service (this, m); } +int +TAO_Profile::encode_alternate_endpoints(void) +{ + // this should be a pure virtual, but there are many + // existing specializations that would need to be + // modified. This maintains the existing behavior, since + // the previous version of the POA did not gather alternate + // endpoints. + + return 0; +} + // **************************************************************** TAO_Unknown_Profile::TAO_Unknown_Profile (CORBA::ULong tag, diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h index c2de3870424..89c39d531ca 100644 --- a/TAO/tao/Profile.h +++ b/TAO/tao/Profile.h @@ -201,6 +201,14 @@ public: virtual int encode_endpoints (void) = 0; /** + * Encodes this profile's endpoints into protocol specific tagged + * components. This is used for non-RTCORBA applications that share + * endpoints on profiles. The only known implementation is IIOP, using + * TAG_ALTERNATE_IIOP_ADDRESS components. + */ + virtual int encode_alternate_endpoints (void); + + /** * Return pointer to this profile's endpoint. If the profile * contains more than one endpoint, i.e., a list, the method returns * the head of the list. diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp index c908e78fb49..c0add695c95 100644 --- a/TAO/tao/params.cpp +++ b/TAO/tao/params.cpp @@ -30,7 +30,7 @@ TAO_ORB_Parameters::TAO_ORB_Parameters (void) , sched_policy_ (THR_SCHED_DEFAULT) , scope_policy_ (THR_SCOPE_PROCESS) , single_read_optimization_ (1) - , shared_profile_ (1) + , shared_profile_ (0) , pref_network_ () , disable_rt_collocation_resolver_ (false) , enforce_preferred_interfaces_ (false) diff --git a/TAO/tests/AlternateIIOP/run_test.pl b/TAO/tests/AlternateIIOP/run_test.pl index 8763d3f49ec..c8734d538a4 100755 --- a/TAO/tests/AlternateIIOP/run_test.pl +++ b/TAO/tests/AlternateIIOP/run_test.pl @@ -15,7 +15,7 @@ $status = 0; "-orbendpoint iiop://localhost:10202/hostname_in_ior=bogus.com"); $valid_ep = "-orbendpoint iiop://localhost:10201"; print "Running ../Hello/server with -o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]\n"; -$SV_ALT_IIOP = new PerlACE::Process ("../Hello/server", "-o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]"); +$SV_ALT_IIOP = new PerlACE::Process ("../Hello/server", "-ORBUseSharedProfile 1 -o $iorfile $bogus_eps[0] $valid_ep $bogus_eps[1]"); $CL_ALT_IIOP = new PerlACE::Process ("../Hello/client", " -k file://$iorfile"); $SV_ALT_IIOP->Spawn (); |