1 10 package org.mmbase.module; 11 12 import java.util.*; 13 14 import org.mmbase.core.util.DaemonThread; 15 import org.mmbase.util.logging.Logger; 16 import org.mmbase.util.logging.Logging; 17 18 27 public class ModuleProbe extends DaemonThread { 28 29 private static final Logger log = Logging.getLoggerInstance(ModuleProbe.class); 30 31 public ModuleProbe() { 32 super("ModuleProbe"); 33 } 34 35 38 public void executeTask() { 39 try { 41 Iterator i = Module.getModules(); 42 while(i != null && i.hasNext()) { 43 Module module = (Module) i.next(); 44 try { 45 module.maintainance(); 46 } catch (RuntimeException e) { 47 log.error("Exception on maintainance call of " + module.getName() + " : " + e.getMessage()); 48 } 49 } 50 } catch (ConcurrentModificationException cme) { 51 log.debug("Module list changed - abort current probe, try again later"); 52 } 53 } 54 } 55 | Popular Tags |