geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akulshresh...@apache.org
Subject svn commit: r583662 - in /geronimo/sandbox/monitoring: client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/ mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/ mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/mon...
Date Thu, 11 Oct 2007 01:31:43 GMT
Author: akulshreshtha
Date: Wed Oct 10 18:31:42 2007
New Revision: 583662

URL: http://svn.apache.org/viewvc?rev=583662&view=rev
Log:
GERONIMO-3522 Monitoring Client Patch by Erik B. Craig

Modified:
    geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java
    geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControl.java
    geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotThread.java

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java?rev=583662&r1=583661&r2=583662&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java
(original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java
Wed Oct 10 18:31:42 2007
@@ -246,7 +246,7 @@
             try
             {
 
-                if (MRCConnection.startSnapshotThread(new Long(10000)))
+                if (MRCConnection.startSnapshotThread(new Long(snapshotDuration)))
                 {
                     request.setAttribute("message",
                             "<b>Snapshot thread started on server "

Modified: geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControl.java?rev=583662&r1=583661&r2=583662&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControl.java
(original)
+++ geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControl.java
Wed Oct 10 18:31:42 2007
@@ -134,8 +134,7 @@
                 statsMap.put(stts[i].getName() + " MinTime", min);
                 statsMap.put(stts[i].getName() + " TotalTime", total);
             } else {
-                // this should never happen
-                throw new Exception();
+                // for the time being, only numbers should be returned
             }
         }
         return statsMap;
@@ -369,6 +368,14 @@
         return SnapshotXMLBuilder.getAllSnapshotStatAttributes();
     }
 
+    /**
+     * @return Returns true if snapshot is running.
+     */
+    public boolean isSnapshotRunning() {
+        // snapshot is running when the duration is not infinity
+        return !snapshotThread.getEnd();
+    }
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -388,6 +395,7 @@
         infoFactory.addOperation("getAllSnapshotStatAttributes", new Class[] {}, "HashMap");
         infoFactory.addOperation("addMBeanForSnapshot", new Class[] {String.class}, "void");
         infoFactory.addOperation("removeMBeanForSnapshot", new Class[] {String.class}, "void");
+        infoFactory.addOperation("isSnapshotRunning", new Class[] {}, "boolean");
         infoFactory.setConstructor(new String[] {});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotThread.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotThread.java?rev=583662&r1=583661&r2=583662&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotThread.java
(original)
+++ geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotThread.java
Wed Oct 10 18:31:42 2007
@@ -216,4 +216,8 @@
             }
         }
     }
+    
+    public boolean getEnd() {
+        return end;
+    }
 }



Mime
View raw message