1 #include "orbsvcs/Log_Macros.h"
2 #include "Monitor_Signal_Handler.h"
4 TAO_LB_Monitor_Signal_Handler::TAO_LB_Monitor_Signal_Handler (
6 PortableServer::POA_ptr poa
,
7 CosLoadBalancing::LoadManager_ptr load_manager
,
8 const PortableGroup::Location
& location
)
9 : TAO_LB_Signal_Handler (orb
, poa
),
10 load_manager_ (CosLoadBalancing::LoadManager::_duplicate (load_manager
)),
17 TAO_LB_Monitor_Signal_Handler::perform_cleanup (int signum
)
21 // Deregister the LoadMonitor from the LoadManager in the PULL
22 // load monitoring case.
23 if (!CORBA::is_nil (this->load_manager_
.in ()))
25 this->load_manager_
->remove_load_monitor (this->location_
);
28 catch (const CORBA::Exception
& ex
)
30 ex
._tao_print_exception ("Caught exception");
32 ORBSVCS_ERROR_RETURN ((LM_ERROR
,
33 "Problem during LoadMonitor cleanup "
34 "initiated by signal %d.\n",
39 return this->TAO_LB_Signal_Handler::perform_cleanup (signum
);