diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-02-12 23:05:37 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-02-12 23:05:37 +0000 |
commit | 0c12b11aa184fb1c64ab8774c028c01541e90836 (patch) | |
tree | acf81168f648f71bb959c4e47dd06d9a60d3456a | |
parent | 6c56fbf996167f9bc0723d1147c89ebc4e4617df (diff) | |
download | ATCD-0c12b11aa184fb1c64ab8774c028c01541e90836.tar.gz |
ChangeLogTag:Wed Feb 12 18:15:24 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r-- | TAO/tao/ChangeLog | 102 | ||||
-rw-r--r-- | TAO/tao/ClientRequestInfo_i.cpp | 95 | ||||
-rw-r--r-- | TAO/tao/Client_Strategy_Factory.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Client_Strategy_Factory.h | 3 | ||||
-rw-r--r-- | TAO/tao/IIOP_Profile.cpp | 59 | ||||
-rw-r--r-- | TAO/tao/IIOP_Profile.h | 10 | ||||
-rw-r--r-- | TAO/tao/Invocation.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/Profile.cpp | 70 | ||||
-rw-r--r-- | TAO/tao/Profile.h | 17 | ||||
-rw-r--r-- | TAO/tao/Profile.i | 1 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Profile.cpp | 59 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Profile.h | 6 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connector.cpp | 9 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Profile.cpp | 59 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Profile.h | 6 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Profile.cpp | 58 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Profile.h | 6 | ||||
-rw-r--r-- | TAO/tao/Stub.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/Tagged_Components.cpp | 115 | ||||
-rw-r--r-- | TAO/tao/Tagged_Components.h | 11 | ||||
-rw-r--r-- | TAO/tao/Tagged_Components.i | 15 | ||||
-rw-r--r-- | TAO/tao/default_client.cpp | 19 | ||||
-rw-r--r-- | TAO/tao/default_client.h | 4 |
23 files changed, 402 insertions, 349 deletions
diff --git a/TAO/tao/ChangeLog b/TAO/tao/ChangeLog new file mode 100644 index 00000000000..a5c793b738d --- /dev/null +++ b/TAO/tao/ChangeLog @@ -0,0 +1,102 @@ +Wed Feb 12 18:15:24 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * Merged in changes from the main trunk. + +Wed Feb 12 15:40:46 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tao/Tagged_Components.h: + * tao/Tagged_Components.cpp: + * tao/Tagged_Components.i (TAO_Tagged_Components): Create + IOP::MultipleComponentProfile lazily, instead of creating + actively on the stack and increase the runtime footprint. If we + do this we only pay when TAO gets something that TAO doesnt + understand. This changed forced us to change the signature of + the components (). Instead of returning a reference we now + return a pointer to the underlying + IOP::MultipleComponentProfile. + +Thu Feb 6 17:51:06 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tao/Tagged_Components.cpp: Removed some vague print statements. + * tao/Strategies/SHMIOP_Connector.cpp: Fixed some debug + statements. + +Thu Feb 6 16:37:32 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tao/Stub.cpp (ior_info_): + * tao/Invocation.cpp: + * tao/ClientRequestInfo_i.cpp: Added error checks to the last + checkins. + +Sun Jan 26 23:50:17 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tao/Profile.cpp: + * tao/Profile.h: + * tao/Profile.i: Added a new method create_tagged_profile + (). Infact, this method existed in the derived classes returning + a reference to the underlying IOP::TaggedProfile. Since the + method existed in all the derived classes and was doing similar + things it has now been moved to the base class with a slight + signature change. This now returns a pointer to the underlying + IOP:TaggedProfile. The signatuer change has been needed because + of the change mentioned below. + + We will henceforth hold a pointer to the IOP::TaggedProfile + instead of an instance in the Profile classes. We will create an + instance when needed, (heard of lazy evaluation?). This change + is forced on us due to the runtime memory consumed by + IOR's. Holding a pointer instead of the actual object instance + gets us approximately 24 bytes per IOR on Linux on a 32 bit + processor. + + * tao/IIOP_Profile.h: + * tao/IIOP_Profile.cpp: + * tao/Strategies/UIOP_Profile.cpp: + * tao/Strategies/UIOP_Profile.h: + * tao/Strategies/SHMIOP_Profile.cpp: + * tao/Strategies/SHMIOP_Profile.h: + * tao/Strategies/DIOP_Profile.cpp: + * tao/Strategies/DIOP_Profile.h: Removed create_tagged_profile () + and the instance of IOP::TaggedProfile. + + * tao/Invocation.cpp: + * tao/Stub.cpp: + * tao/ClientRequestInfo_i.cpp: Changes forced on us due to the + signature change above. + +Sun Jan 26 21:41:26 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * Mering with the main trunk and moving to a new branch. + +Sun Jan 26 21:16:14 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * docs/Options.html: documented the new option. + +Mon Jan 20 09:00:55 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + The aim of this checkin is to provide an option to configure the + size of the dispatcher table in the Muxed_Transport_Strategy. + + * tao/Client_Strategy_Factory.cpp: + * tao/Client_Strategy_Factory.h: Added a new virtual method to + fetch the dispatcher table size + + * tao/default_client.cpp: + * tao/default_client.h: Concrete implementation for the new + virtual method. The default value for the dispatcher table size + is set to TAO_RD_TABLE_SIZE which is defined in orbconf.h. The + table size can also be changed at runtime using a -ORB option + which is explained below. + + We now have an option called -ORBReplyDispatcherTableSize which + will parse and set a user provided value as the dispatcher table + size. This gives extra flexibility to the user. + + * tao/orbconf.h: Added TAO_RD_TABLE_SIZE and set the value to be + 16. + + * tao/Muxed_TMS.cpp: + * tao/Muxed_TMS.h: All the above changes were motivated to reduce + the size of the hash table that this class creates increasing + the run-time footprint. The default value of 1024 was probably + an over kill for this class. diff --git a/TAO/tao/ClientRequestInfo_i.cpp b/TAO/tao/ClientRequestInfo_i.cpp index c1147b8a1de..c8b9fe32916 100644 --- a/TAO/tao/ClientRequestInfo_i.cpp +++ b/TAO/tao/ClientRequestInfo_i.cpp @@ -131,11 +131,19 @@ TAO_ClientRequestInfo_i::effective_profile (ACE_ENV_SINGLE_ARG_DECL) IOP::TaggedProfile_var safe_tagged_profile = tagged_profile; - IOP::TaggedProfile &ep = + IOP::TaggedProfile *ep = this->target_->_stubobj ()->profile_in_use ()->create_tagged_profile (); - tagged_profile->tag = ep.tag; - tagged_profile->profile_data = ep.profile_data; // Deep copy + if (ep == 0) + { + ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, + CORBA::COMPLETED_NO), + 0); + } + + // @@BAD_PARAM exception + tagged_profile->tag = ep->tag; + tagged_profile->profile_data = ep->profile_data; // Deep copy return safe_tagged_profile._retn (); } @@ -202,35 +210,38 @@ TAO_ClientRequestInfo_i::get_effective_component ( TAO_Tagged_Components &ecs = this->target_->_stubobj ()->profile_in_use ()->tagged_components (); - IOP::MultipleComponentProfile &components = ecs.components (); + IOP::MultipleComponentProfile *components = + ecs.components (); - CORBA::ULong len = components.length (); - for (CORBA::ULong i = 0; i < len; ++i) + if (components) { - if (components[i].tag == id) + CORBA::ULong len = components->length (); + for (CORBA::ULong i = 0; i < len; ++i) { - IOP::TaggedComponent *tagged_component = 0; + if ((*components)[i].tag == id) + { + IOP::TaggedComponent *tagged_component = 0; - // Only allocate a sequence if we have a tagged component - // that matches the given IOP::ComponentId. - ACE_NEW_THROW_EX (tagged_component, - IOP::TaggedComponent, - CORBA::NO_MEMORY ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - ENOMEM), - CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (0); + // Only allocate a sequence if we have a tagged component + // that matches the given IOP::ComponentId. + ACE_NEW_THROW_EX (tagged_component, + IOP::TaggedComponent, + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); - IOP::TaggedComponent_var safe_tagged_component = - tagged_component; + IOP::TaggedComponent_var safe_tagged_component = + tagged_component; - (*tagged_component) = components[i]; // Deep copy + (*tagged_component) = (*components)[i]; // Deep copy - return safe_tagged_component._retn (); + return safe_tagged_component._retn (); + } } } - // No tagged component was found that matched the given // IOP::ComponentId. ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, @@ -247,36 +258,38 @@ TAO_ClientRequestInfo_i::get_effective_components ( TAO_Tagged_Components &ecs = this->target_->_stubobj ()->profile_in_use ()->tagged_components (); - IOP::MultipleComponentProfile &components = ecs.components (); + IOP::MultipleComponentProfile *components = ecs.components (); IOP::TaggedComponentSeq *tagged_components = 0; IOP::TaggedComponentSeq_var safe_tagged_components; - - CORBA::ULong len = components.length (); - for (CORBA::ULong i = 0; i < len; ++i) + if (components) { - if (components[i].tag == id) + CORBA::ULong len = components->length (); + for (CORBA::ULong i = 0; i < len; ++i) { - if (tagged_components == 0) + if ((*components)[i].tag == id) { - // Only allocate a sequence if we have tagged components - // to place into the sequence. - ACE_NEW_THROW_EX (tagged_components, - IOP::TaggedComponentSeq, - CORBA::NO_MEMORY ( - CORBA::SystemException::_tao_minor_code ( + if (tagged_components == 0) + { + // Only allocate a sequence if we have tagged components + // to place into the sequence. + ACE_NEW_THROW_EX (tagged_components, + IOP::TaggedComponentSeq, + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( TAO_DEFAULT_MINOR_CODE, ENOMEM), CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (0); + ACE_CHECK_RETURN (0); - safe_tagged_components = tagged_components; - } + safe_tagged_components = tagged_components; + } - CORBA::ULong old_len = safe_tagged_components->length (); - safe_tagged_components->length (old_len + 1); + CORBA::ULong old_len = safe_tagged_components->length (); + safe_tagged_components->length (old_len + 1); - safe_tagged_components[old_len] = components[i]; // Deep copy + safe_tagged_components[old_len] = (*components)[i]; // Deep copy + } } } diff --git a/TAO/tao/Client_Strategy_Factory.cpp b/TAO/tao/Client_Strategy_Factory.cpp index ce49a810f50..9aa411b72a8 100644 --- a/TAO/tao/Client_Strategy_Factory.cpp +++ b/TAO/tao/Client_Strategy_Factory.cpp @@ -24,6 +24,12 @@ TAO_Client_Strategy_Factory::create_transport_mux_strategy (TAO_Transport *) return 0; } +int +TAO_Client_Strategy_Factory::reply_dispatcher_table_size (void) const +{ + return 0; +} + TAO_Wait_Strategy * TAO_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *) { diff --git a/TAO/tao/Client_Strategy_Factory.h b/TAO/tao/Client_Strategy_Factory.h index 98d0aac6dac..cf1da78ab6d 100644 --- a/TAO/tao/Client_Strategy_Factory.h +++ b/TAO/tao/Client_Strategy_Factory.h @@ -56,6 +56,9 @@ public: /// Create the correct client request muxing strategy. virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport); + /// Return the size of the reply dispatcher table + virtual int reply_dispatcher_table_size (void) const; + /// Create the correct client <wait_for_reply> strategy. virtual TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport); diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index 2702168bf3a..1345c66b0a1 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -38,8 +38,7 @@ TAO_IIOP_Profile::TAO_IIOP_Profile (const ACE_INET_Addr &addr, endpoint_ (addr, orb_core->orb_params ()->use_dotted_decimal_addresses ()), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -52,8 +51,7 @@ TAO_IIOP_Profile::TAO_IIOP_Profile (const char* host, : TAO_Profile (IOP::TAG_INTERNET_IOP, orb_core, version), endpoint_ (host, port, addr), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -63,8 +61,7 @@ TAO_IIOP_Profile::TAO_IIOP_Profile (TAO_ORB_Core *orb_core) TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)), endpoint_ (), count_ (1), - object_key_ (), - tagged_profile_ () + object_key_ () { } @@ -449,56 +446,6 @@ TAO_IIOP_Profile::encode (TAO_OutputCDR &stream) const return 1; } - -IOP::TaggedProfile & -TAO_IIOP_Profile::create_tagged_profile (void) -{ - // Check whether we have already created the TaggedProfile - if (this->tagged_profile_.profile_data.get_buffer () == 0) - { - // As we have not created we will now create the TaggedProfile - this->tagged_profile_.tag = IOP::TAG_INTERNET_IOP; - - // Create the encapsulation.... - TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE, - TAO_ENCAP_BYTE_ORDER, - this->orb_core ()->output_cdr_buffer_allocator (), - this->orb_core ()->output_cdr_dblock_allocator (), - this->orb_core ()->output_cdr_msgblock_allocator (), - this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), - TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR, - this->orb_core ()->to_iso8859 (), - this->orb_core ()->to_unicode ()); - - // Create the profile body - this->create_profile_body (encap); - - CORBA::ULong length = - ACE_static_cast(CORBA::ULong,encap.total_length ()); - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - // Place the message block in to the Sequence of Octets that we - // have - this->tagged_profile_.profile_data.replace (length, - encap.begin ()); -#else - this->tagged_profile_.profile_data.length (length); - CORBA::Octet *buffer = - this->tagged_profile_.profile_data.get_buffer (); - for (const ACE_Message_Block *i = encap.begin (); - i != encap.end (); - i = i->next ()) - { - ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ()); - buffer += i->length (); - } -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ - } - - return this->tagged_profile_; -} - void TAO_IIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const { diff --git a/TAO/tao/IIOP_Profile.h b/TAO/tao/IIOP_Profile.h index 8b55bead27f..53e0b26bc54 100644 --- a/TAO/tao/IIOP_Profile.h +++ b/TAO/tao/IIOP_Profile.h @@ -142,14 +142,10 @@ public: virtual CORBA::ULong hash (CORBA::ULong max ACE_ENV_ARG_DECL); - /// Please refer to Profile.h for the documentation of this - /// function. - virtual IOP::TaggedProfile &create_tagged_profile (void); - private: /// Creates an encapsulation of the ProfileBody struct in the <cdr> - void create_profile_body (TAO_OutputCDR &cdr) const; + virtual void create_profile_body (TAO_OutputCDR &cdr) const; /** * Helper for <decode>. Decodes endpoints from a tagged component. @@ -183,12 +179,8 @@ protected: size_t count_; private: - /// object_key associated with this profile. TAO_ObjectKey object_key_; - - /// Our tagged profile - IOP::TaggedProfile tagged_profile_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index 7e8d96c8beb..5728d07bc3f 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -345,6 +345,7 @@ TAO_GIOP_Invocation::prepare_header (CORBA::Octet response_flags ACE_ENV_ARG_PARAMETER); ACE_CHECK; + // Set the target specification mode switch (this->profile_->addressing_mode ()) { @@ -354,10 +355,14 @@ TAO_GIOP_Invocation::prepare_header (CORBA::Octet response_flags break; case TAO_Target_Specification::Profile_Addr: - this->target_spec_.target_specifier ( - this->profile_->create_tagged_profile () - ); - break; + { + IOP::TaggedProfile *tp = + this->profile_->create_tagged_profile (); + + if (tp) + this->target_spec_.target_specifier (*tp); + } + break; case TAO_Target_Specification::Reference_Addr: // We need to call the method seperately. If there is no diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp index a2735761762..69274a5f53c 100644 --- a/TAO/tao/Profile.cpp +++ b/TAO/tao/Profile.cpp @@ -7,7 +7,7 @@ #include "Messaging_PolicyValueC.h" #include "Stub.h" #include "debug.h" -#include "tao/target_specification.h" +#include "target_specification.h" #if !defined (__ACE_INLINE__) #include "Profile.i" @@ -20,6 +20,8 @@ ACE_RCSID(tao, Profile, "$Id$") TAO_Profile::~TAO_Profile (void) { + if (this->tagged_profile_) + delete this->tagged_profile_; } void @@ -39,6 +41,58 @@ TAO_Profile::add_tagged_component (const IOP::TaggedComponent &component this->tagged_components ().set_component (component); } +IOP::TaggedProfile * +TAO_Profile::create_tagged_profile (void) +{ + if (this->tagged_profile_ == 0) + { + ACE_NEW_RETURN (this->tagged_profile_, + IOP::TaggedProfile, + 0); + + // As we have not created we will now create the TaggedProfile + this->tagged_profile_->tag = this->tag_; + + // Create the encapsulation.... + TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE, + TAO_ENCAP_BYTE_ORDER, + this->orb_core ()->output_cdr_buffer_allocator (), + this->orb_core ()->output_cdr_dblock_allocator (), + this->orb_core ()->output_cdr_msgblock_allocator (), + this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, + this->orb_core ()->to_iso8859 (), + this->orb_core ()->to_unicode ()); + + // Create the profile body + this->create_profile_body (encap); + + CORBA::ULong length = + ACE_static_cast(CORBA::ULong,encap.total_length ()); + +#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) + // Place the message block in to the Sequence of Octets that we + // have + this->tagged_profile_->profile_data.replace (length, + encap.begin ()); +#else + this->tagged_profile_->profile_data.length (length); + CORBA::Octet *buffer = + this->tagged_profile_.profile_data.get_buffer (); + for (const ACE_Message_Block *i = encap.begin (); + i != encap.end (); + i = i->next ()) + { + ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ()); + buffer += i->length (); + } +#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ + } + + return this->tagged_profile_; +} + void TAO_Profile::policies (CORBA::PolicyList *policy_list ACE_ENV_ARG_DECL) @@ -350,8 +404,7 @@ TAO_Unknown_Profile::TAO_Unknown_Profile (CORBA::ULong tag, TAO_ORB_Core *orb_core) : TAO_Profile (tag, orb_core, - TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)), - tagged_profile_ () + TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)) { } @@ -443,12 +496,9 @@ TAO_Unknown_Profile::hash (CORBA::ULong max this->body_.length ()) % max); } -IOP::TaggedProfile& -TAO_Unknown_Profile::create_tagged_profile (void) +void +TAO_Unknown_Profile::create_profile_body (TAO_OutputCDR &) const { - this->tagged_profile_.tag = this->tag (); - - // I dont know about the rest, so we return our copy - return this->tagged_profile_; - + // No idea about the profile body! Just return + return; } diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h index a1fb45772ba..bac298eae34 100644 --- a/TAO/tao/Profile.h +++ b/TAO/tao/Profile.h @@ -142,7 +142,7 @@ public: * return the reference to that. This method is necessary for GIOP * 1.2. */ - virtual IOP::TaggedProfile &create_tagged_profile (void) = 0; + IOP::TaggedProfile *create_tagged_profile (void); /// This method sets the client exposed policies, i.e., the ones /// propagated in the IOR, for this profile. @@ -197,6 +197,11 @@ public: */ CORBA::Short addressing_mode (void) const; +protected: + + /// Creates an encapsulation of the ProfileBody struct in the <cdr> + virtual void create_profile_body (TAO_OutputCDR &cdr) const = 0; + private: /// this object keeps ownership of this object @@ -214,6 +219,7 @@ private: ACE_UNIMPLEMENTED_FUNC (TAO_Profile (const TAO_Profile&)) ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Profile&)) + protected: /// IIOP version number. @@ -243,6 +249,9 @@ protected: /// exception. CORBA::Short addressing_mode_; + /// Our tagged profile + IOP::TaggedProfile *tagged_profile_; + private: /// IOP protocol tag. @@ -260,7 +269,6 @@ private: /// Number of outstanding references to this object. CORBA::ULong refcount_; - }; /** @@ -298,11 +306,12 @@ public: virtual CORBA::Boolean is_equivalent (const TAO_Profile* other_profile); virtual CORBA::ULong hash (CORBA::ULong max ACE_ENV_ARG_DECL); - virtual IOP::TaggedProfile &create_tagged_profile (void); +private: + + virtual void create_profile_body (TAO_OutputCDR &encap) const; private: TAO_opaque body_; - IOP::TaggedProfile tagged_profile_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Profile.i b/TAO/tao/Profile.i index 339f2e8a369..d624473abf9 100644 --- a/TAO/tao/Profile.i +++ b/TAO/tao/Profile.i @@ -10,6 +10,7 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag, stub_ (0), policy_list_ (0), addressing_mode_ (0), + tagged_profile_ (0), tag_ (tag), orb_core_ (orb_core), forward_to_ (0), diff --git a/TAO/tao/Strategies/DIOP_Profile.cpp b/TAO/tao/Strategies/DIOP_Profile.cpp index 41401ee8b9c..d46518d31d6 100644 --- a/TAO/tao/Strategies/DIOP_Profile.cpp +++ b/TAO/tao/Strategies/DIOP_Profile.cpp @@ -40,8 +40,7 @@ TAO_DIOP_Profile::TAO_DIOP_Profile (const ACE_INET_Addr &addr, endpoint_ (addr, orb_core->orb_params ()->use_dotted_decimal_addresses ()), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -54,8 +53,7 @@ TAO_DIOP_Profile::TAO_DIOP_Profile (const char* host, : TAO_Profile (TAO_TAG_UDP_PROFILE, orb_core, version), endpoint_ (host, port, addr), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -65,8 +63,7 @@ TAO_DIOP_Profile::TAO_DIOP_Profile (TAO_ORB_Core *orb_core) TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)), endpoint_ (), count_ (1), - object_key_ (), - tagged_profile_ () + object_key_ () { } @@ -447,56 +444,6 @@ TAO_DIOP_Profile::encode (TAO_OutputCDR &stream) const return 1; } - -IOP::TaggedProfile & -TAO_DIOP_Profile::create_tagged_profile (void) -{ - // Check whether we have already created the TaggedProfile - if (this->tagged_profile_.profile_data.get_buffer () == 0) - { - // As we have not created we will now create the TaggedProfile - this->tagged_profile_.tag = TAO_TAG_UDP_PROFILE; - - // Create the encapsulation.... - TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE, - TAO_ENCAP_BYTE_ORDER, - this->orb_core ()->output_cdr_buffer_allocator (), - this->orb_core ()->output_cdr_dblock_allocator (), - this->orb_core ()->output_cdr_msgblock_allocator (), - this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), - TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR, - this->orb_core ()->to_iso8859 (), - this->orb_core ()->to_unicode ()); - - // Create the profile body - this->create_profile_body (encap); - - CORBA::ULong length = - ACE_static_cast(CORBA::ULong,encap.total_length ()); - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - // Place the message block in to the Sequence of Octets that we - // have - this->tagged_profile_.profile_data.replace (length, - encap.begin ()); -#else - this->tagged_profile_.profile_data.length (length); - CORBA::Octet *buffer = - this->tagged_profile_.profile_data.get_buffer (); - for (const ACE_Message_Block *i = encap.begin (); - i != encap.end (); - i = i->next ()) - { - ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ()); - buffer += i->length (); - } -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ - } - - return this->tagged_profile_; -} - void TAO_DIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const { diff --git a/TAO/tao/Strategies/DIOP_Profile.h b/TAO/tao/Strategies/DIOP_Profile.h index 0a1263c8d51..0d9bc4a240c 100644 --- a/TAO/tao/Strategies/DIOP_Profile.h +++ b/TAO/tao/Strategies/DIOP_Profile.h @@ -147,10 +147,6 @@ public: virtual CORBA::ULong hash (CORBA::ULong max ACE_ENV_ARG_DECL); - /// Please refer to Profile.h for the documentation of this - /// function. - virtual IOP::TaggedProfile &create_tagged_profile (void); - private: /// Creates an encapsulation of the ProfileBody struct in the <cdr> @@ -192,8 +188,6 @@ private: /// Object_key associated with this profile. TAO_ObjectKey object_key_; - /// Our tagged profile - IOP::TaggedProfile tagged_profile_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp index e600a1b1636..4a4d28a04c4 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp @@ -214,19 +214,16 @@ TAO_SHMIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, if (result == -1) { - char buffer [MAXNAMELEN * 2]; - desc->endpoint ()->addr_to_string (buffer, - (MAXNAMELEN * 2) - 1); - // Give users a clue to the problem. if (TAO_debug_level > 0) { ACE_DEBUG ((LM_ERROR, ACE_TEXT ("(%P|%t) %s:%u, connection to ") - ACE_TEXT ("%s failed (%p)\n"), + ACE_TEXT ("<%s:%p> failed (%p)\n"), __FILE__, __LINE__, - buffer, + shmiop_endpoint->host (), + shmiop_endpoint->port (), ACE_TEXT ("errno"))); } diff --git a/TAO/tao/Strategies/SHMIOP_Profile.cpp b/TAO/tao/Strategies/SHMIOP_Profile.cpp index 99bb7f2f3b8..fa764a11dc9 100644 --- a/TAO/tao/Strategies/SHMIOP_Profile.cpp +++ b/TAO/tao/Strategies/SHMIOP_Profile.cpp @@ -38,8 +38,7 @@ TAO_SHMIOP_Profile::TAO_SHMIOP_Profile (const ACE_MEM_Addr &addr, endpoint_ (addr, orb_core->orb_params ()->use_dotted_decimal_addresses ()), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -52,8 +51,7 @@ TAO_SHMIOP_Profile::TAO_SHMIOP_Profile (const char* host, : TAO_Profile (TAO_TAG_SHMEM_PROFILE, orb_core, version), endpoint_ (host, port, addr), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -63,8 +61,7 @@ TAO_SHMIOP_Profile::TAO_SHMIOP_Profile (TAO_ORB_Core *orb_core) TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)), endpoint_ (), count_ (1), - object_key_ (), - tagged_profile_ () + object_key_ () { } @@ -458,56 +455,6 @@ TAO_SHMIOP_Profile::encode (TAO_OutputCDR &stream) const return 1; } -IOP::TaggedProfile & -TAO_SHMIOP_Profile::create_tagged_profile (void) -{ - // Check whether we have already created the TaggedProfile - if (this->tagged_profile_.profile_data.get_buffer () == 0) - { - // As we have not created we will now create the TaggedProfile - this->tagged_profile_.tag = TAO_TAG_SHMEM_PROFILE; - - // Create the encapsulation.... - TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE, - TAO_ENCAP_BYTE_ORDER, - this->orb_core ()->output_cdr_buffer_allocator (), - this->orb_core ()->output_cdr_dblock_allocator (), - this->orb_core ()->output_cdr_msgblock_allocator (), - this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), - TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR, - this->orb_core ()->to_iso8859 (), - this->orb_core ()->to_unicode ()); - - // Create the profile body - this->create_profile_body (encap); - - CORBA::ULong length = - ACE_static_cast(CORBA::ULong,encap.total_length ()); - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - // Place the message block in to the Sequence of Octets that we - // have - this->tagged_profile_.profile_data.replace (length, - encap.begin ()); -#else - this->tagged_profile_.profile_data.length (length); - CORBA::Octet *buffer = - this->tagged_profile_.profile_data.get_buffer (); - for (const ACE_Message_Block *i = encap.begin (); - i != encap.end (); - i = i->next ()) - { - ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ()); - buffer += i->length (); - } -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1*/ - } - - return this->tagged_profile_; -} - - void TAO_SHMIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const { diff --git a/TAO/tao/Strategies/SHMIOP_Profile.h b/TAO/tao/Strategies/SHMIOP_Profile.h index 3c132cb42a3..208aaca97bc 100644 --- a/TAO/tao/Strategies/SHMIOP_Profile.h +++ b/TAO/tao/Strategies/SHMIOP_Profile.h @@ -141,9 +141,6 @@ public: CORBA::ULong hash (CORBA::ULong max ACE_ENV_ARG_DECL); - /// Please refer to Profile.h for the documentation of this method - IOP::TaggedProfile &create_tagged_profile (void); - private: /// Create an encapsulation of the struct ProfileBody in <cdr> @@ -180,9 +177,6 @@ private: /// Object_key associated with this profile. TAO_ObjectKey object_key_; - - /// The tagged profile info - IOP::TaggedProfile tagged_profile_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Strategies/UIOP_Profile.cpp b/TAO/tao/Strategies/UIOP_Profile.cpp index 769dca3b406..5c47ed50aeb 100644 --- a/TAO/tao/Strategies/UIOP_Profile.cpp +++ b/TAO/tao/Strategies/UIOP_Profile.cpp @@ -39,8 +39,7 @@ TAO_UIOP_Profile::TAO_UIOP_Profile (const ACE_UNIX_Addr &addr, : TAO_Profile (TAO_TAG_UIOP_PROFILE, orb_core, version), endpoint_ (addr), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -52,8 +51,7 @@ TAO_UIOP_Profile::TAO_UIOP_Profile (const char *, : TAO_Profile (TAO_TAG_UIOP_PROFILE, orb_core, version), endpoint_ (addr), count_ (1), - object_key_ (object_key), - tagged_profile_ () + object_key_ (object_key) { } @@ -64,8 +62,7 @@ TAO_UIOP_Profile::TAO_UIOP_Profile (TAO_ORB_Core *orb_core) TAO_DEF_GIOP_MINOR)), endpoint_ (), count_ (1), - object_key_ (), - tagged_profile_ () + object_key_ () { } @@ -400,55 +397,6 @@ TAO_UIOP_Profile::encode (TAO_OutputCDR &stream) const return 1; } -IOP::TaggedProfile & -TAO_UIOP_Profile::create_tagged_profile (void) -{ - // Check whether we have already created the TaggedProfile - if (this->tagged_profile_.profile_data.get_buffer () == 0) - { - // As we have not created we will now create the TaggedProfile - this->tagged_profile_.tag = TAO_TAG_UIOP_PROFILE; - - // Create the encapsulation.... - TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE, - TAO_ENCAP_BYTE_ORDER, - this->orb_core ()->output_cdr_buffer_allocator (), - this->orb_core ()->output_cdr_dblock_allocator (), - this->orb_core ()->output_cdr_msgblock_allocator (), - this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), - TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR, - this->orb_core ()->to_iso8859 (), - this->orb_core ()->to_unicode ()); - - // Create the profile body - this->create_profile_body (encap); - - CORBA::ULong length = - ACE_static_cast(CORBA::ULong, encap.total_length ()); - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - // Place the message block in to the Sequence of Octets that we - // have - this->tagged_profile_.profile_data.replace (length, - encap.begin ()); -#else - this->tagged_profile_.profile_data.length (length); - CORBA::Octet *buffer = - this->tagged_profile_.profile_data.get_buffer (); - for (const ACE_Message_Block *i = encap.begin (); - i != encap.end (); - i = i->next ()) - { - ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ()); - buffer += i->length (); - } -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1*/ - } - - return this->tagged_profile_; -} - void TAO_UIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const { diff --git a/TAO/tao/Strategies/UIOP_Profile.h b/TAO/tao/Strategies/UIOP_Profile.h index 9a7e62ca90f..d5bf3fc61de 100644 --- a/TAO/tao/Strategies/UIOP_Profile.h +++ b/TAO/tao/Strategies/UIOP_Profile.h @@ -140,9 +140,6 @@ public: virtual CORBA::ULong hash (CORBA::ULong max ACE_ENV_ARG_DECL); - /// Please see the Profile.h for the documentation of this method - virtual IOP::TaggedProfile &create_tagged_profile (void); - private: /// Create an encapsulation of the struct ProfileBody in <cdr> @@ -179,9 +176,6 @@ private: /// Object_key associated with this profile. TAO_ObjectKey object_key_; - - /// Our tagged profile info - IOP::TaggedProfile tagged_profile_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp index f99d5f3de9c..6cb5e4e2d38 100644 --- a/TAO/tao/Stub.cpp +++ b/TAO/tao/Stub.cpp @@ -258,7 +258,13 @@ TAO_Stub::get_profile_ior_info (TAO_MProfile &profiles, { TAO_Profile *prof = profiles.get_profile (index); - ior_info->profiles[index] = prof->create_tagged_profile (); + IOP::TaggedProfile *tp = + prof->create_tagged_profile (); + + if (tp == 0) + ACE_THROW_RETURN (CORBA::NO_MEMORY (), + -1); + ior_info->profiles[index] = *tp; } return 0; diff --git a/TAO/tao/Tagged_Components.cpp b/TAO/tao/Tagged_Components.cpp index 52279af989c..0683e94fe43 100644 --- a/TAO/tao/Tagged_Components.cpp +++ b/TAO/tao/Tagged_Components.cpp @@ -120,6 +120,7 @@ TAO_Tagged_Components::set_known_component_i ( TAO_InputCDR cdr (ACE_reinterpret_cast (const char*, component.component_data.get_buffer ()), component.component_data.length ()); + CORBA::Boolean byte_order; if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) return; @@ -130,7 +131,6 @@ TAO_Tagged_Components::set_known_component_i ( CORBA::ULong orb_type; if ((cdr >> orb_type) == 0) return; - this->orb_type_ = orb_type; this->orb_type_set_ = 1; } @@ -153,11 +153,23 @@ TAO_Tagged_Components::set_component_i (const IOP::TaggedComponent& component) { // @@ TODO Some components can show up multiple times, others // can't find out and take appropiate action. - for (CORBA::ULong i = 0; i != this->components_.length (); ++i) + + if (this->components_ == 0) + { + int retval = + this->create_components_i (); + + if (retval == -1) + ACE_ERROR ((LM_DEBUG, + "(%P|%t) TAO - TAO_Tagged_Components::set_components_i ", + "create_components_i failed \n")); + } + + for (CORBA::ULong i = 0; i != this->components_->length (); ++i) { - if (component.tag == this->components_[i].tag) + if (component.tag == (*this->components_)[i].tag) { - this->components_[i] = component; + (*this->components_)[i] = component; return; } } @@ -167,14 +179,24 @@ TAO_Tagged_Components::set_component_i (const IOP::TaggedComponent& component) void TAO_Tagged_Components::set_component_i (IOP::TaggedComponent& component) { - for (CORBA::ULong i = 0; i != this->components_.length (); ++i) + if (this->components_ == 0) { - if (component.tag == this->components_[i].tag) + int retval = + this->create_components_i (); + + if (retval == -1) + ACE_ERROR ((LM_DEBUG, + "(%P|%t) TAO - TAO_Tagged_Components::set_component_i ", + "create_components_i failed \n")); + } + for (CORBA::ULong i = 0; i != this->components_->length (); ++i) + { + if (component.tag == (*this->components_)[i].tag) { CORBA::ULong max = component.component_data.maximum (); CORBA::ULong len = component.component_data.length (); CORBA::Octet* buf = component.component_data.get_buffer (1); - this->components_[i].component_data.replace (max, len, buf, 1); + (*this->components_)[i].component_data.replace (max, len, buf, 1); return; } } @@ -184,35 +206,72 @@ TAO_Tagged_Components::set_component_i (IOP::TaggedComponent& component) void TAO_Tagged_Components::add_component_i (IOP::TaggedComponent& component) { + if (this->components_ == 0) + { + int retval = + this->create_components_i (); + + if (retval == -1) + ACE_ERROR ((LM_DEBUG, + "(%P|%t) TAO - TAO_Tagged_Components::add_component_i ", + "create_components_i failed \n")); + } // @@ TODO Some components can show up multiple times, others // can't find out and take appropiate action. - CORBA::ULong l = this->components_.length (); - this->components_.length (l + 1); - this->components_[l].tag = component.tag; + CORBA::ULong l = this->components_->length (); + this->components_->length (l + 1); + (*this->components_)[l].tag = component.tag; CORBA::ULong max = component.component_data.maximum (); CORBA::ULong len = component.component_data.length (); CORBA::Octet* buf = component.component_data.get_buffer (1); - this->components_[l].component_data.replace (max, len, buf, 1); + (*this->components_)[l].component_data.replace (max, len, buf, 1); } void TAO_Tagged_Components::add_component_i (const IOP::TaggedComponent& component) { + if (this->components_ == 0) + { + int retval = + this->create_components_i (); + + if (retval == -1) + ACE_ERROR ((LM_DEBUG, + "(%P|%t) TAO - TAO_Tagged_Components::add_components_i ", + "create_components_i () failed \n")); + } + // @@ TODO Some components can show up multiple times, others // can't find out and take appropiate action. - CORBA::ULong l = this->components_.length (); - this->components_.length (l + 1); - this->components_[l] = component; + CORBA::ULong l = this->components_->length (); + this->components_->length (l + 1); + (*this->components_)[l] = component; +} + +int +TAO_Tagged_Components::create_components_i (void) +{ + // @@ NOTE: Very bad way to allocate data. Exceptions?? + ACE_NEW_RETURN (this->components_, + IOP::MultipleComponentProfile, + -1); + + return 0; } int TAO_Tagged_Components::get_component (IOP::TaggedComponent& component) const { - for (CORBA::ULong i = 0; i != this->components_.length (); ++i) + if (this->components_ == 0) + return 0; + + for (CORBA::ULong i = 0; + i != this->components_->length (); + ++i) { - if (component.tag == this->components_[i].tag) + if (component.tag == (*this->components_)[i].tag) { - component = this->components_[i]; + component = (*this->components_)[i]; return 1; } } @@ -224,7 +283,10 @@ TAO_Tagged_Components::get_component (IOP::TaggedComponent& component) const int TAO_Tagged_Components::encode (TAO_OutputCDR& cdr) const { - return (cdr << this->components_); + if (this->components_ == 0) + return 1; + + return (cdr << *this->components_); } int @@ -234,14 +296,25 @@ TAO_Tagged_Components::decode (TAO_InputCDR& cdr) this->orb_type_set_ = 0; this->code_sets_set_ = 0; - if ((cdr >> this->components_) == 0) + if (this->components_ == 0) + { + int retval = + this->create_components_i (); + + if (retval == -1) + ACE_ERROR ((LM_DEBUG, + "(%P|%t) TAO - TAO_Tagged_Components::decode ", + "create_components_i failed \n")); + + } + if ((cdr >> *this->components_) == 0) return 0; - CORBA::ULong l = this->components_.length (); + CORBA::ULong l = this->components_->length (); for (CORBA::ULong i = 0; i != l; ++i) { const IOP::TaggedComponent &component = - this->components_[i]; + (*this->components_)[i]; if (this->known_tag (component.tag)) this->set_known_component_i (component); } diff --git a/TAO/tao/Tagged_Components.h b/TAO/tao/Tagged_Components.h index fc93c8aa667..6608bfad5a8 100644 --- a/TAO/tao/Tagged_Components.h +++ b/TAO/tao/Tagged_Components.h @@ -93,11 +93,9 @@ public: int decode (TAO_InputCDR& cdr); /** - * Read/Write access to the underlying - * MutipleComponentProfile. Added by request from Chris Hafey - * <chris@stentorsoft.com> + * Read/Write access to the underlying MutipleComponentProfile. */ - IOP::MultipleComponentProfile &components (void); + IOP::MultipleComponentProfile *components (void); private: /// Helper method to implement set_code_sets() @@ -116,6 +114,9 @@ private: int get_known_component_i (IOP::TaggedComponent& component) const; int get_component_i (IOP::TaggedComponent& component) const; + /// Helper method to create <this->components_> + int create_components_i (void); + /// Is <tag> a well-known component? int known_tag (IOP::ComponentId tag) const; @@ -134,7 +135,7 @@ private: /// The rest of the components, to be compliant we cannot drop a /// bunch of them. - IOP::MultipleComponentProfile components_; + IOP::MultipleComponentProfile *components_; // A flag for each component... CORBA::Octet orb_type_set_; diff --git a/TAO/tao/Tagged_Components.i b/TAO/tao/Tagged_Components.i index d67dcc6e07b..65114bfccc0 100644 --- a/TAO/tao/Tagged_Components.i +++ b/TAO/tao/Tagged_Components.i @@ -4,9 +4,11 @@ ACE_INLINE TAO_Tagged_Components::TAO_Tagged_Components (void) - : orb_type_ (0), - orb_type_set_ (0), - code_sets_set_ (0) + : orb_type_ (0) + , components_ (0) + , orb_type_set_ (0) + , code_sets_set_ (0) + { } @@ -60,8 +62,11 @@ TAO_Tagged_Components::unique_tag (IOP::ComponentId tag) const || tag == IOP::TAG_DCE_NO_PIPES); } -ACE_INLINE IOP::MultipleComponentProfile& +ACE_INLINE IOP::MultipleComponentProfile * TAO_Tagged_Components::components (void) { - return this->components_; + if (this->components_ != 0) + return this->components_; + + return 0; } diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp index a1ae2f8e890..b28b021320e 100644 --- a/TAO/tao/default_client.cpp +++ b/TAO/tao/default_client.cpp @@ -19,7 +19,8 @@ ACE_RCSID(tao, default_client, "$Id$") TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void) - : profile_lock_type_ (TAO_THREAD_LOCK) + : profile_lock_type_ (TAO_THREAD_LOCK), + rd_table_size_ (TAO_RD_TABLE_SIZE) { // Use single thread client connection handler #if defined (TAO_USE_ST_CLIENT_CONNECTION_HANDLER) @@ -75,7 +76,6 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) this->report_option_value_error (ACE_LIB_TEXT("-ORBProfileLock"), name); } } - else if (ACE_OS::strcasecmp (argv[curarg], ACE_LIB_TEXT("-ORBIIOPProfileLock")) == 0) { @@ -157,6 +157,15 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) this->report_option_value_error (ACE_LIB_TEXT("-ORBTransportMuxStrategy"), name); } } + else if (ACE_OS::strcmp (argv[curarg], + ACE_LIB_TEXT("-ORBReplyDispatcherTableSize")) == 0) + { + curarg++; + if (curarg < argc) + { + this->rd_table_size_ = ACE_OS::atoi (argv[curarg]); + } + } else if (ACE_OS::strncmp (argv[curarg], ACE_LIB_TEXT("-ORB"), 4) == 0) { // Can we assume there is an argument after the option? @@ -220,6 +229,12 @@ TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (TAO_Transpor return tms; } +int +TAO_Default_Client_Strategy_Factory::reply_dispatcher_table_size (void) const +{ + return this->rd_table_size_; +} + TAO_Wait_Strategy * TAO_Default_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *transport) { diff --git a/TAO/tao/default_client.h b/TAO/tao/default_client.h index 48b83338640..13698ee8156 100644 --- a/TAO/tao/default_client.h +++ b/TAO/tao/default_client.h @@ -52,6 +52,7 @@ public: // following methods. virtual ACE_Lock* create_profile_lock (void); virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport); + virtual int reply_dispatcher_table_size (void) const; virtual int allow_callback (void); virtual TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport); virtual TAO_Connect_Strategy *create_connect_strategy (TAO_ORB_Core *); @@ -99,6 +100,9 @@ private: /// The connection initiation strategy. Connect_Strategy connect_strategy_; + + /// Size of the reply dispatcher table + int rd_table_size_; }; #if defined (__ACE_INLINE__) |