diff options
Diffstat (limited to 'TAO/tao/IIOP_Connector.cpp')
-rw-r--r-- | TAO/tao/IIOP_Connector.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index df46d268994..ddc3d34c51a 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -12,6 +12,7 @@ #include "ace/Auto_Ptr.h" #include "tao/Base_Transport_Property.h" #include "tao/Protocols_Hooks.h" +#include "tao/Connection_Purging_Strategy.h" #include "ace/Strategies_T.h" #include "ace/SOCK_Connector.h" @@ -158,8 +159,8 @@ TAO_IIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc, // Check the Cache first for connections // If transport found, reference count is incremented on assignment - if (this->orb_core ()->transport_cache ().find_transport (desc, - base_transport) == 0) + if (this->orb_core ()->purging_strategy ()->find_in_cache (desc, + base_transport) == 0) { if (TAO_debug_level > 2) ACE_DEBUG ((LM_DEBUG, @@ -174,6 +175,9 @@ TAO_IIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc, ACE_TEXT ("(%P|%t) IIOP_Connector::connect - ") ACE_TEXT ("making a new connection\n"))); + // Purge connections (if necessary) + this->orb_core ()->purging_strategy ()->purge (); + // @@ This needs to change in the next round when we implement a // policy that will not allow new connections when a connection // is busy. @@ -224,8 +228,8 @@ TAO_IIOP_Connector::connect (TAO_Transport_Descriptor_Interface *desc, base_transport = TAO_Transport::_duplicate (svc_handler->transport ()); // Add the handler to Cache int retval = - this->orb_core ()->transport_cache ().cache_transport (desc, - base_transport); + this->orb_core ()->purging_strategy ()->add_to_cache (desc, + base_transport); if (retval != 0 && TAO_debug_level > 0) { @@ -370,8 +374,8 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) // Add the handler to Cache int retval = - this->orb_core ()->transport_cache ().cache_transport (&prop, - handlers[slot]->transport ()); + this->orb_core ()->purging_strategy ()->add_to_cache (&prop, + handlers[slot]->transport ()); successes++; if (retval != 0 && TAO_debug_level > 4) |