00001 // $Id: Auto_Update_Starter.cpp 86518 2009-08-18 12:30:56Z olli $ 00002 00003 #include "ace/Monitor_Control/Auto_Update_Starter.h" 00004 00005 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) 00006 00007 #include "ace/Reactor.h" 00008 #include "ace/Dynamic_Service.h" 00009 #include "ace/Monitor_Admin_Manager.h" 00010 00011 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00012 00013 namespace ACE 00014 { 00015 namespace Monitor_Control 00016 { 00017 int 00018 Auto_Update_Starter::svc (void) 00019 { 00020 MC_ADMINMANAGER* mgr = 00021 ACE_Dynamic_Service<MC_ADMINMANAGER>::instance ("MC_ADMINMANAGER"); 00022 00023 /// We want the thread in which the event loop is started to 00024 /// own the reactor, otherwise the handle_timeout() calls 00025 /// aren't triggerd. 00026 mgr->admin ().reactor ()->owner (ACE_Thread::self ()); 00027 00028 return mgr->admin ().reactor ()->run_reactor_event_loop (); 00029 } 00030 } 00031 } 00032 00033 ACE_END_VERSIONED_NAMESPACE_DECL 00034 00035 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */