1 23 24 29 30 package com.sun.enterprise.web; 31 32 import java.util.*; 33 import java.util.logging.*; 34 import com.sun.logging.*; 35 36 40 public class WebDebugMonitor { 41 42 private static Logger _logger; 43 static 44 { 45 _logger=LogDomains.getLogger(LogDomains.WEB_LOGGER); 46 } 47 48 49 public WebDebugMonitor() { 50 } 51 52 HashMap getDebugMonitoringDetails() { 53 HashMap resultMap = new HashMap(); 54 boolean debugMonitoring = false; 55 resultMap.put("debugMonitoring", new Boolean (false)); 56 long debugMonitoringPeriodMS = 30000L; 57 try{ 58 Properties props = System.getProperties(); 59 String str=props.getProperty("MONITOR_WEB_CONTAINER"); 60 if(null!=str) { 61 if( str.equalsIgnoreCase("TRUE")) 62 debugMonitoring=true; 64 } 65 String period=props.getProperty("MONITOR_WEB_TIME_PERIOD_SECONDS"); 66 if(null!=period) { 67 debugMonitoringPeriodMS = (new Long (period).longValue())* 1000; 68 } 69 resultMap.put("debugMonitoringPeriodMS", new Long (debugMonitoringPeriodMS)); 70 resultMap.put("debugMonitoring", new Boolean (debugMonitoring)); 71 72 } catch(Exception e) 73 { 74 _logger.log(Level.SEVERE,"WebDebugMonitor.getDebugMonitoringDetails(), Exception when trying to get the System properties - ", e.toString()); 75 } 76 return resultMap; 77 } 78 79 } 80 | Popular Tags |