diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-04-30 18:27:25 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-04-30 18:27:25 +0000 |
commit | 671b34b6e0e943b1410099fd71fb981c9d24acf7 (patch) | |
tree | 8695226afc2814f40ef0796aa7a757979759e39d /TAO/tao | |
parent | e9a6f598c5fdf3042505119096a53178b1843a81 (diff) | |
download | ATCD-671b34b6e0e943b1410099fd71fb981c9d24acf7.tar.gz |
ChangeLogTag:Mon Apr 30 11:23:45 2001 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/CDR_Encaps_Codec.h | 8 | ||||
-rw-r--r-- | TAO/tao/Cache_Entries.h | 11 | ||||
-rw-r--r-- | TAO/tao/Cache_Entries.inl | 8 | ||||
-rw-r--r-- | TAO/tao/ClientRequestInfo.h | 74 | ||||
-rw-r--r-- | TAO/tao/IIOP_Endpoint.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 1 | ||||
-rw-r--r-- | TAO/tao/PortableServer/ServerRequestInfo.h | 79 | ||||
-rw-r--r-- | TAO/tao/Transport_Cache_Manager.cpp | 34 |
8 files changed, 186 insertions, 37 deletions
diff --git a/TAO/tao/CDR_Encaps_Codec.h b/TAO/tao/CDR_Encaps_Codec.h index bf8189983e0..41fee8fffc6 100644 --- a/TAO/tao/CDR_Encaps_Codec.h +++ b/TAO/tao/CDR_Encaps_Codec.h @@ -67,8 +67,8 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, IOP::Codec::InvalidTypeForEncoding)); - // Extract the TypeCode and the value from the octet sequence and - // place them into an Any. + /// Extract the TypeCode and the value from the octet sequence and + /// place them into an Any. virtual CORBA::Any * decode (const CORBA::OctetSeq & data, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) @@ -83,8 +83,8 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, IOP::Codec::InvalidTypeForEncoding)); - // Extract the value from the octet sequence, based on the given - // TypeCode, and place it into an Any. + /// Extract the value from the octet sequence, based on the given + /// TypeCode, and place it into an Any. virtual CORBA::Any * decode_value (const CORBA::OctetSeq & data, CORBA::TypeCode_ptr tc, CORBA::Environment &ACE_TRY_ENV = diff --git a/TAO/tao/Cache_Entries.h b/TAO/tao/Cache_Entries.h index 65a39540237..fc497013272 100644 --- a/TAO/tao/Cache_Entries.h +++ b/TAO/tao/Cache_Entries.h @@ -83,6 +83,17 @@ public: /// Get/Set <recycle_state>. ACE_Recyclable_State recycle_state (void); + /// Relinquish ownership of the TAO_Transport object associated with + /// this TAO_Cache_IntId. + /** + * @note This method should go away once the + * Transport_Cache_Map_Manager is improved so that it returns + * TAO_Transport objects when performing a find() operation. + * This method really only exists to get around inadequacies + * in the Transport_Cache_Map_Manager interface. + */ + TAO_Transport *relinquish_transport (void); + private: /// The transport that needs to be cached. diff --git a/TAO/tao/Cache_Entries.inl b/TAO/tao/Cache_Entries.inl index ae9318579d2..1e6bbc118fb 100644 --- a/TAO/tao/Cache_Entries.inl +++ b/TAO/tao/Cache_Entries.inl @@ -52,6 +52,14 @@ TAO_Cache_IntId::recycle_state (void) return this->recycle_state_; } +ACE_INLINE TAO_Transport * +TAO_Cache_IntId::relinquish_transport (void) +{ + // Yield ownership of the TAO_Transport object. + TAO_Transport *val = this->transport_; + this->transport_ = 0; + return val; +} /*******************************************************/ ACE_INLINE diff --git a/TAO/tao/ClientRequestInfo.h b/TAO/tao/ClientRequestInfo.h index ef92b0c92c7..a5c78d180d4 100644 --- a/TAO/tao/ClientRequestInfo.h +++ b/TAO/tao/ClientRequestInfo.h @@ -2,7 +2,7 @@ //============================================================================= /** - * @file ClientRequestInfo.h + * @file ClientRequestInfo.h * * $Id$ * @@ -41,26 +41,40 @@ class TAO_GIOP_Invocation; +/** + * @class TAO_ClientRequestInfo + * + * @brief Implementation of the PortableInterceptor::ClientRequestInfo + * interface. + */ class TAO_Export TAO_ClientRequestInfo : public virtual PortableInterceptor::ClientRequestInfo, public virtual CORBA::LocalObject { public: + + /// Constructor. TAO_ClientRequestInfo (TAO_GIOP_Invocation *invocation, CORBA::Object_ptr target); + /// Return an ID unique to the current request. This request ID may + /// or may not be the same as the GIOP request ID. virtual CORBA::ULong request_id ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the operation name for the current request. virtual char * operation ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the list of arguments passed to the current operation. virtual Dynamic::ParameterList * arguments ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the list of exceptions the current operation is capable + /// of throwing. virtual Dynamic::ExceptionList * exceptions ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -73,24 +87,38 @@ public: CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the result of the current request. If there is no return + /// value then an Any with tk_void TypeCode is returned. This is + /// method is not valid for oneway operations. virtual CORBA::Any * result ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Returns true for a two-way operation, and false otherwise. virtual CORBA::Boolean response_expected ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)) ; #if TAO_HAS_CORBA_MESSAGING == 1 + /// Return the sync_scope policy value for the current one-way + /// operation. If the operation is not a one-way, a + /// CORBA::BAD_INV_ORDER exception is thrown. virtual CORBA::Short sync_scope ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ + /// Return the reply status for the current request. Statuses can + /// be PortableInterceptor::SUCCESSFUL, SYSTEM_EXCEPTION, + /// USER_EXCEPTION, LOCATION_FORWARD, LOCATION_FORWARD_PERMANENT, + /// TRANSPORT_RETRY. virtual PortableInterceptor::ReplyStatus reply_status ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// If the reply status is PortableInterceptor::LOCATION_FORWARD or + /// PortableInterceptor::LOCATION_FORWARD_PERMANENT, return the + /// object reference to which the request was forwarded. virtual CORBA::Object_ptr forward_reference ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)) ; @@ -101,20 +129,28 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, PortableInterceptor::InvalidSlot)); + /// Return the IOP::ServiceContext with the given IOP::ServiceId + /// from the request service context list. virtual IOP::ServiceContext * get_request_service_context ( IOP::ServiceId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the IOP::ServiceContext with the given IOP::ServiceId + /// from the reply service context list. virtual IOP::ServiceContext * get_reply_service_context ( IOP::ServiceId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the (initial, non-forwarded, or permanently forwarded) + /// object reference of the target. virtual CORBA::Object_ptr target ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the object reference for the current target. The target + /// may change in the even of a location forward. virtual CORBA::Object_ptr effective_target ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -123,44 +159,62 @@ public: CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); - /// This method causes problem since there is no trivial way to - /// extract the exception from the Any. + /// Return an Any containing the received exception, if any. + /// Otherwise, throw a CORBA::BAD_INV_ORDER exception. + /** + * @note There is no trivial way to extract the exception from an Any. + */ virtual CORBA::Any * received_exception ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); - /// Note: This is TAO specific and was done to combat the previous - /// problem to some extent. + /** + * @note This is TAO specific and was done to combat the previous + * problem to some extent. Avoid this method whenever + * possible. + */ virtual CORBA::Exception * _received_exception ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the repository ID for the received exception. virtual char * received_exception_id ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the first IOP::TaggedComponent that matches the given + /// IOP::ComponentId in the object reference for the current + /// target. virtual IOP::TaggedComponent * get_effective_component ( IOP::ComponentId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return all IOP::TaggedComponent(s) that match the given + /// IOP::ComponentId in the object reference for the current + /// target. virtual IOP::TaggedComponentSeq * get_effective_components ( IOP::ComponentId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the policy of the given type in effect for the current + /// request. virtual CORBA::Policy_ptr get_request_policy ( CORBA::PolicyType type, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Add the IOP::ServiceContext to the request (outgoing) + /// IOP::ServiceContextList. virtual void add_request_service_context ( const IOP::ServiceContext & service_context, CORBA::Boolean replace, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); - /** @name Stub helper methods + /** + * @name Stub helper methods * * The following methods are used in the implementation of the * Stubs, they are not part of the ClientRequestInfo interface, but @@ -195,13 +249,21 @@ protected: protected: + /// Pointer to the GIOP invocation object. TAO_GIOP_Invocation *invocation_; + /// Reference to the target object. CORBA::Object_ptr target_; + + /// Pointer to the caught exception. CORBA::Exception *caught_exception_; + /// True if a two-way operation, false otherwise. CORBA::Boolean response_expected_; + + /// Reply status for the current request. PortableInterceptor::ReplyStatus reply_status_; + }; # if defined (__ACE_INLINE__) diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp index 5b194b5d20b..9e32819f9e4 100644 --- a/TAO/tao/IIOP_Endpoint.cpp +++ b/TAO/tao/IIOP_Endpoint.cpp @@ -179,7 +179,9 @@ TAO_IIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) CORBA::ULong TAO_IIOP_Endpoint::hash (void) { - return - ACE::hash_pjw (this->host_.in ()) - + this->port_; + // We could call ACE_INET_Addr::hash() since it does much the same + // thing except that it converts the port from network byte order to + // host byte order. As such, this implementation is actually less + // costly. + return this->object_addr_.get_ip_address () + this->port_; } diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index f21cb3ce67a..9c73a8dcc87 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -4,7 +4,6 @@ #include "Servant_Base.h" #include "POA.h" #include "Operation_Table.h" -#include "Collocated_Object.h" #include "tao/Timeprobe.h" #include "tao/ORB_Core.h" diff --git a/TAO/tao/PortableServer/ServerRequestInfo.h b/TAO/tao/PortableServer/ServerRequestInfo.h index 30646626fc6..970904e8300 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.h +++ b/TAO/tao/PortableServer/ServerRequestInfo.h @@ -2,12 +2,12 @@ //============================================================================= /** - * @file ServerRequestInfo.h + * @file ServerRequestInfo.h * - * $Id$ + * $Id$ * - * This is the implementation of the - * PortableInterceptor::ServerRequestInfo interface. + * This is the implementation of the + * PortableInterceptor::ServerRequestInfo interface. * * @author Kirthika Parameswaran <kirthika@cs.wustl.edu> * @author Ossama Othman <ossama@uci.edu> @@ -47,25 +47,39 @@ class TAO_ServerRequest; +/** + * @class TAO_ClientRequestInfo + * + * @brief Implementation of the PortableInterceptor::ClientRequestInfo + * interface. + */ class TAO_PortableServer_Export TAO_ServerRequestInfo : public virtual PortableInterceptor::ServerRequestInfo, public virtual CORBA::LocalObject { public: + + /// Constructor. TAO_ServerRequestInfo (TAO_ServerRequest &server_request); + /// Return an ID unique to the current request. This request ID may + /// or may not be the same as the GIOP request ID. virtual CORBA::ULong request_id ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the operation name for the current request. virtual char * operation ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the list of arguments passed to the current operation. virtual Dynamic::ParameterList * arguments ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the list of exceptions the current operation is capable + /// of throwing. virtual Dynamic::ExceptionList * exceptions ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -78,24 +92,38 @@ public: CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the result of the current request. If there is no return + /// value then an Any with tk_void TypeCode is returned. This is + /// method is not valid for oneway operations. virtual CORBA::Any * result ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Returns true for a two-way operation, and false otherwis.e virtual CORBA::Boolean response_expected ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)) ; #if TAO_HAS_CORBA_MESSAGING == 1 + /// Return the sync_scope policy value for the current one-way + /// operation. If the operation is not a one-way, a + /// CORBA::BAD_INV_ORDER exception is thrown. virtual Messaging::SyncScope sync_scope ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); #endif /* TAO_HAS_CORBA_MESSAGING */ + /// Return the reply status for the current request. Statuses can + /// be PortableInterceptor::SUCCESSFUL, SYSTEM_EXCEPTION, + /// USER_EXCEPTION, LOCATION_FORWARD, LOCATION_FORWARD_PERMANENT, + /// TRANSPORT_RETRY. virtual PortableInterceptor::ReplyStatus reply_status ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// If the reply status is PortableInterceptor::LOCATION_FORWARD or + /// PortableInterceptor::LOCATION_FORWARD_PERMANENT, return the + /// object reference to which the request was forwarded. virtual CORBA::Object_ptr forward_reference ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)) ; @@ -106,40 +134,55 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, PortableInterceptor::InvalidSlot)); + /// Return the IOP::ServiceContext with the given IOP::ServiceId + /// from the request service context list. virtual IOP::ServiceContext * get_request_service_context ( IOP::ServiceId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the IOP::ServiceContext with the given IOP::ServiceId + /// from the reply service context list. virtual IOP::ServiceContext * get_reply_service_context ( IOP::ServiceId id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); - /// This method causes problem since there is no trivial way to - /// extract the exception from the Any. + /// Return an Any containing the exception being sent, if any. + /// Otherwise, throw a CORBA::BAD_INV_ORDER exception. + /** + * @note There is no trivial way to extract the exception from an Any. + */ virtual CORBA::Any * sending_exception ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); - /// Note: This is TAO specific and was done to combat the previous - /// problem to some extent. + /** + * @note This is TAO specific and was done to combat the previous + * problem to some extent. Avoid this method whenever + * possible. + */ virtual CORBA::Exception * _sending_exception ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the ObjectId for the target object. virtual CORBA::OctetSeq * object_id ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the AdapterId for the POA handling the current request. virtual CORBA::OctetSeq * adapter_id ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the most derived interface of the target object. virtual char * target_most_derived_interface ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the policy of the given type in effect for the current + /// request. virtual CORBA::Policy_ptr get_server_policy ( CORBA::PolicyType type, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) @@ -152,11 +195,15 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, PortableInterceptor::InvalidSlot)); + /// Returns true if the target's type corresponds to the given + /// RepositoryId. virtual CORBA::Boolean target_is_a ( const char * id, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Add the IOP::ServiceContext to the reply (outgoing) + /// IOP::ServiceContextList. virtual void add_reply_service_context ( const IOP::ServiceContext & service_context, CORBA::Boolean replace, @@ -165,6 +212,11 @@ public: public: + /** + * @name Helper methods specific to TAO. + */ + //@{ + /// Change the exception status. void exception (CORBA::Exception *exception); @@ -182,7 +234,10 @@ public: /// manager. void forward_reference (CORBA::Object_ptr obj); + //@} + protected: + /// Helper method to get the request and response service contexts. IOP::ServiceContext *get_service_context_i ( TAO_Service_Context &service_context_list, @@ -193,17 +248,23 @@ protected: protected: /// Underlying request object that contains much of the information - /// encapsulated by this ServerRequestInfo class. + /// encapsulated by this TAO_ServerRequestInfo class. TAO_ServerRequest &server_request_; + /// Reference to the target the request will be forwarded. This + /// reference is only valid if the reply status is + /// PortableInterceptor::LOCATION_FORWARD or LOCATION_FORWARD_PERMANENT. CORBA::Object_var forward_reference_; // PortableServer::Current_var poa_current_; // CORBA::OctetSeq_var adapter_id_; + /// Pointer to the caught exception. CORBA::Exception *caught_exception_; + /// Reply status for the current request. PortableInterceptor::ReplyStatus reply_status_; + }; # if defined (__ACE_INLINE__) diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp index a8dd4aa2c16..ea6e9c3b7c3 100644 --- a/TAO/tao/Transport_Cache_Manager.cpp +++ b/TAO/tao/Transport_Cache_Manager.cpp @@ -41,8 +41,8 @@ TAO_Transport_Cache_Manager::open (TAO_ORB_Core *orb_core, if (this->cache_lock_ == 0) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) ERROR TAO_Transport_Cache_Manager::open "), - ACE_TEXT ("Lock creation error \n")), + ACE_TEXT ("TAO (%P|%t) ERROR TAO_Transport_Cache_Manager::open: "), + ACE_TEXT ("Lock creation error\n")), -1); } @@ -79,7 +79,7 @@ TAO_Transport_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id, ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Transport_Cache_Manager::bind_i") ACE_TEXT (" unable to bind in the first attempt \n") - ACE_TEXT (" So trying with a new index \n"))); + ACE_TEXT (" So trying with a new index\n"))); } @@ -104,11 +104,13 @@ TAO_Transport_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id, return retval; } -// Used to be in the .inl, but moved here b/c the use of TAO_Transport::_duplicate() -// caused an include file cycle with inlining turned on. +// Used to be in the .inl, but moved here b/c the use of +// TAO_Transport::_duplicate() caused an include file cycle with +// inlining turned on. int -TAO_Transport_Cache_Manager::find_transport (TAO_Transport_Descriptor_Interface *prop, - TAO_Transport *&transport) +TAO_Transport_Cache_Manager::find_transport ( + TAO_Transport_Descriptor_Interface *prop, + TAO_Transport *&transport) { if (prop == 0) { @@ -124,7 +126,7 @@ TAO_Transport_Cache_Manager::find_transport (TAO_Transport_Descriptor_Interface int_id); if (retval == 0) { - transport = TAO_Transport::_duplicate (int_id.transport ()); + transport = int_id.relinquish_transport (); } return retval; @@ -132,7 +134,7 @@ TAO_Transport_Cache_Manager::find_transport (TAO_Transport_Descriptor_Interface int TAO_Transport_Cache_Manager::find_i (const TAO_Cache_ExtId &key, - TAO_Cache_IntId &value) + TAO_Cache_IntId &value) { HASH_MAP_ENTRY *entry = 0; @@ -160,13 +162,17 @@ TAO_Transport_Cache_Manager::find_i (const TAO_Cache_ExtId &key, if (idle) { - // We have a succesful entry + // Successfully found a TAO_Transport. + + // NOTE: This assignment operator indirectly incurs two + // lock operations since it duplicates and releases + // TAO_Transport objects. value = entry->int_id_; if (TAO_debug_level > 4) { ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P |%t) index in find <%d> \n"), + ACE_TEXT ("(%P |%t) index in find <%d>\n"), entry->ext_id_.index ())); } return 0; @@ -182,7 +188,7 @@ TAO_Transport_Cache_Manager::find_i (const TAO_Cache_ExtId &key, { ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) TAO_Transport_Cache_Manager::find_i") - ACE_TEXT (" unable to locate a free connection \n"))); + ACE_TEXT (" unable to locate a free connection\n"))); } return retval; @@ -239,8 +245,8 @@ TAO_Transport_Cache_Manager::make_idle_i (HASH_MAP_ENTRY *&entry) else if (TAO_debug_level > 0 && retval != 0) { ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_Transport_Cache_Manager::make_idle_i") - ACE_TEXT ("unable to locate the entry to make it idle \n"))); + ACE_TEXT ("(%P|%t) TAO_Transport_Cache_Manager::make_idle_i:\n") + ACE_TEXT ("(%P|%t) unable to locate the entry to make it idle\n"))); } return retval; |