geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecr...@apache.org
Subject svn commit: r598728 - in /geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor: MasterRemoteControl.java MasterRemoteControlRemote.java snapshot/SnapshotConfigXMLBuilder.java
Date Tue, 27 Nov 2007 18:40:59 GMT
Author: ecraig
Date: Tue Nov 27 10:40:56 2007
New Revision: 598728

URL: http://svn.apache.org/viewvc?rev=598728&view=rev
Log:
Monitoring server
Applied geronimo-3555 from Viet to return a boolean from add/remove 
snapshot 
method in the mrc-server.


Modified:
    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/MasterRemoteControlRemote.java
    geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotConfigXMLBuilder.java

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=598728&r1=598727&r2=598728&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
Tue Nov 27 10:40:56 2007
@@ -515,8 +515,8 @@
      * @param mbeanName
      */
     @RolesAllowed("mejbuser")
-    public void addMBeanForSnapshot(String mbeanName) {
-        SnapshotConfigXMLBuilder.addMBeanName(mbeanName);
+    public boolean addMBeanForSnapshot(String mbeanName) {
+        return SnapshotConfigXMLBuilder.addMBeanName(mbeanName);
     }
 
     /**
@@ -526,8 +526,8 @@
      * @param mbeanName
      */
     @RolesAllowed("mejbuser")
-    public void removeMBeanForSnapshot(String mbeanName) {
-        SnapshotConfigXMLBuilder.removeMBeanName(mbeanName);
+    public boolean removeMBeanForSnapshot(String mbeanName) {
+        return SnapshotConfigXMLBuilder.removeMBeanName(mbeanName);
     }
     
     /**

Modified: geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControlRemote.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControlRemote.java?rev=598728&r1=598727&r2=598728&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControlRemote.java
(original)
+++ geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/MasterRemoteControlRemote.java
Tue Nov 27 10:40:56 2007
@@ -59,9 +59,9 @@
     @RolesAllowed("mejbuser")
     public HashMap<String, ArrayList<String>> getAllSnapshotStatAttributes();
     @RolesAllowed("mejbuser")
-    public void addMBeanForSnapshot(String s);
+    public boolean addMBeanForSnapshot(String s);
     @RolesAllowed("mejbuser")
-    public void removeMBeanForSnapshot(String s);
+    public boolean removeMBeanForSnapshot(String s);
     @RolesAllowed("mejbuser")
     public boolean isSnapshotRunning();
     @RolesAllowed("mejbuser")

Modified: geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotConfigXMLBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotConfigXMLBuilder.java?rev=598728&r1=598727&r2=598728&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotConfigXMLBuilder.java
(original)
+++ geronimo/sandbox/monitoring/mrc-server/mrc-ejb/src/main/java/org/apache/geronimo/monitor/snapshot/SnapshotConfigXMLBuilder.java
Tue Nov 27 10:40:56 2007
@@ -77,7 +77,7 @@
      * in order to persistently keep track of all user requested statistics.
      * If there is a duplicate, nothing will be done.
      */
-    public static void removeMBeanName(String mbeanName) {
+    public static boolean removeMBeanName(String mbeanName) {
         ArrayList<String> mbeanList = getMBeanNames();
         // operate on the snapshot-config.xml if there exists the mbean name
         if(mbeanList.contains(mbeanName)) {
@@ -98,6 +98,9 @@
             }
             // save the document
             saveDocument(doc, pathToXML);
+            return true;
+        } else {
+            return false;
         }
     }
 
@@ -106,10 +109,10 @@
      * in order to persistently keep track of all user requested statistics.
      * If there does not exist an instance of the mbeanNAme, nothing will be done.
      */
-    public static void addMBeanName(String mbeanName) {
+    public static boolean addMBeanName(String mbeanName) {
         ArrayList<String> mbeanList = getMBeanNames();
         if(mbeanList.contains(mbeanName)) {
-            return;
+            return false;
         } else {
             // get an instance of the document
             Document doc = openDocument();
@@ -127,6 +130,7 @@
             }
             // save the document
             saveDocument(doc, pathToXML);
+            return true;
         }
     }
     



Mime
View raw message