diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Pull_Handler.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Pull_Handler.cpp | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Pull_Handler.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Pull_Handler.cpp index 3e1c589bbfb..1b12a086660 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Pull_Handler.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Pull_Handler.cpp @@ -25,22 +25,22 @@ TAO_LB_Pull_Handler::handle_timeout ( TAO_LB_Location_Map::iterator end = this->location_map_.end (); - if (being == end) + if (begin == end) return 0; // No work to be done. - // Iterate over all registered load monitors. - // - // @todo This could be potentially very slow. Improve concurrent - // operation at some point in the near future. - for (TAO_LB_Location_Map::iterator i = begin; - i != end; - ++i) + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY { - TAO_LB_Location_Map_Entry *location = (*i).int_id_; - if (!CORBA::is_nil (location->load_monitor.in ())) + // Iterate over all registered load monitors. + // + // @todo This could be potentially very slow. Improve concurrent + // operation at some point in the near future. + for (TAO_LB_Location_Map::iterator i = begin; + i != end; + ++i) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + TAO_LB_Location_Map_Entry *location = (*i).int_id_; + if (!CORBA::is_nil (location->load_monitor.in ())) { location->load_list = location->load_monitor->current_load (ACE_TRY_ENV); @@ -51,21 +51,9 @@ TAO_LB_Pull_Handler::handle_timeout ( // (*i).ext_id_[0].id.in (), // location->load_list[0].value)); } - ACE_CATCHANY - { - // Catch the exception and ignore it. - - if (TAO_debug_level > 0) - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "(%P|%t) Load monitoring exception"); - } - ACE_ENDTRY; } - } - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { + this->balancing_strategy_->analyze_loads (this->location_map_, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -73,10 +61,10 @@ TAO_LB_Pull_Handler::handle_timeout ( ACE_CATCHANY { // Catch the exception and ignore it. - + if (TAO_debug_level > 0) ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "(%P|%t) Load analysis exception"); + "(%P|%t) PullHandler::handle_timeout()\n"); } ACE_ENDTRY; |