diff options
author | bala <balanatarajan@users.noreply.github.com> | 2000-11-06 01:50:47 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2000-11-06 01:50:47 +0000 |
commit | dbfda85ef7bee8c0b4a43b7e63df4b8c7bfb34cd (patch) | |
tree | 8a4a62a588cbecd4c0bb5f6a5b5f4382a3b6dab7 | |
parent | 28a4fc00a6aec1fe7ff72d38b9e98ba8bb7162f8 (diff) | |
download | ATCD-connection_caching_step_1.tar.gz |
*** empty log message ***connection_caching_step_1
-rw-r--r-- | TAO/tao/IIOP_Connector.cpp | 15 | ||||
-rw-r--r-- | TAO/tao/SHMIOP_Connector.cpp | 14 | ||||
-rw-r--r-- | TAO/tao/UIOP_Connector.cpp | 14 |
3 files changed, 39 insertions, 4 deletions
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 958b788e5c4..5054cd74421 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -336,10 +336,21 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) { if (!failures[slot]) { - handlers[slot]->idle (); - // Add it to cache.. + TAO_IIOP_Endpoint endpoint (remote_addrs[slot], + 0); + TAO_Base_Connection_Property prop (&endpoint); + + // Add the handler to Cache + int retval = + this->orb_core ()->connection_cache ().cache_handler (&prop, + handlers[slot]); successes++; + if (retval != 0 && TAO_debug_level > 4) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) Unable to add handles\n"), + ACE_TEXT ("to cache \n"))); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) Preconnection <%s:%d> ") diff --git a/TAO/tao/SHMIOP_Connector.cpp b/TAO/tao/SHMIOP_Connector.cpp index 3fd77e2b969..650700a8dcb 100644 --- a/TAO/tao/SHMIOP_Connector.cpp +++ b/TAO/tao/SHMIOP_Connector.cpp @@ -385,9 +385,21 @@ TAO_SHMIOP_Connector::preconnect (const char *preconnects) { if (!failures[slot]) { - handlers[slot]->idle (); + TAO_SHMIOP_Endpoint endpoint (remote_addrs[slot]); + + TAO_Base_Connection_Property prop (&endpoint); + + // Add the handler to Cache + int retval = + this->orb_core ()->connection_cache ().cache_handler (&prop, + handlers[slot]); successes++; + if (retval != 0 && TAO_debug_level > 4) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) Unable to add handles\n"), + ACE_TEXT ("to cache \n"))); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) Preconnection <%s:%d> ") diff --git a/TAO/tao/UIOP_Connector.cpp b/TAO/tao/UIOP_Connector.cpp index 872fbed8b0d..3f1d3e665d3 100644 --- a/TAO/tao/UIOP_Connector.cpp +++ b/TAO/tao/UIOP_Connector.cpp @@ -305,9 +305,21 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) { if (!failures[slot]) { - handlers[slot]->idle (); + TAO_UIOP_Endpoint endpoint (remote_addrs[slot]); + + TAO_Base_Connection_Property prop (&endpoint); + + // Add the handler to Cache + int retval = + this->orb_core ()->connection_cache ().cache_handler (&prop, + handlers[slot]); ++successes; + if (retval != 0 && TAO_debug_level > 4) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) Unable to add handles\n"), + ACE_TEXT ("to cache \n"))); + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) Preconnection <%s> succeeded.\n", |