You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2005/12/09 00:20:17 UTC

svn commit: r355267 [2/2] - in /geronimo/trunk: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-standard/ applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ applications/console-s...

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java?rev=355267&r1=355266&r2=355267&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java Thu Dec  8 15:20:03 2005
@@ -17,17 +17,6 @@
 
 package org.apache.geronimo.kernel.config;
 
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -36,8 +25,19 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
+import org.apache.geronimo.kernel.management.State;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
 
 /**
  * The standard non-editable ConfigurationManager implementation.  That is,
@@ -168,6 +168,16 @@
     public List loadRecursive(URI configID) throws NoSuchConfigException, IOException, InvalidConfigException {
         LinkedList ancestors = new LinkedList();
         Set preloaded = kernel.listGBeans(CONFIGURATION_NAME_QUERY);
+        for (Iterator it = preloaded.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            try {
+                if(kernel.getGBeanState(name) != State.RUNNING_INDEX) {
+                    it.remove();
+                }
+            } catch (GBeanNotFoundException e) {
+                it.remove();
+            }
+        }
         loadRecursive(configID, ancestors, preloaded);
         return ancestors;
     }

Added: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/Log.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/Log.java?rev=355267&view=auto
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/Log.java (added)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/Log.java Thu Dec  8 15:20:03 2005
@@ -0,0 +1,74 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.geronimo;
+
+import java.io.Serializable;
+
+/**
+ * A general log manager.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public interface Log {
+    /**
+     * The most search lines that will ever be returned, no matter what you
+     * ask for.  This is to conserve memory and transfer bandwidth.
+     */
+    public final static int MAX_SEARCH_RESULTS = 1000;
+    
+    public static class LogMessage implements Serializable {
+        private final int lineNumber;
+        private final String lineContent;
+
+        public LogMessage(int lineNumber, String lineContent) {
+            this.lineNumber = lineNumber;
+            this.lineContent = lineContent;
+        }
+
+        public int getLineNumber() {
+            return lineNumber;
+        }
+
+        public String getLineContent() {
+            return lineContent;
+        }
+    }
+
+    public static class SearchResults implements Serializable {
+        private final int lineCount; // total lines in log file
+        private final LogMessage[] results;
+        private final boolean capped; // whether there were more matched than are returned here
+
+        public SearchResults(int lineCount, LogMessage[] results, boolean capped) {
+            this.lineCount = lineCount;
+            this.results = results;
+            this.capped = capped;
+        }
+
+        public int getLineCount() {
+            return lineCount;
+        }
+
+        public LogMessage[] getResults() {
+            return results;
+        }
+
+        public boolean isCapped() {
+            return capped;
+        }
+    }
+}

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebAccessLog.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebAccessLog.java?rev=355267&r1=355266&r2=355267&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebAccessLog.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebAccessLog.java Thu Dec  8 15:20:03 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.geronimo.management.geronimo;
 
-import java.io.Serializable;
 import java.util.Date;
 
 /**
@@ -24,13 +23,7 @@
  *
  * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
  */
-public interface WebAccessLog {
-    /**
-     * The most search lines that will ever be returned, no matter what you
-     * ask for.  This is to conserve memory and transfer bandwidth.
-     */
-    public final static int MAX_SEARCH_RESULTS = 1000;
-
+public interface WebAccessLog extends Log {
     /**
      * Gets the name of all logs used by this system.  Typically there
      * is only one, but specialized cases may use more.
@@ -62,45 +55,4 @@
                                    String uri, Date startDate, Date endDate,
                                    Integer skipResults, Integer maxResults);
 
-    public static class LogMessage implements Serializable {
-        private final int lineNumber;
-        private final String lineContent;
-
-        public LogMessage(int lineNumber, String lineContent) {
-            this.lineNumber = lineNumber;
-            this.lineContent = lineContent;
-        }
-
-        public int getLineNumber() {
-            return lineNumber;
-        }
-
-        public String getLineContent() {
-            return lineContent;
-        }
-    }
-
-    public static class SearchResults implements Serializable {
-        private final int lineCount; // total lines in log file
-        private final LogMessage[] results;
-        private final boolean capped; // whether there were more matched than are returned here
-
-        public SearchResults(int lineCount, LogMessage[] results, boolean capped) {
-            this.lineCount = lineCount;
-            this.results = results;
-            this.capped = capped;
-        }
-
-        public int getLineCount() {
-            return lineCount;
-        }
-
-        public LogMessage[] getResults() {
-            return results;
-        }
-
-        public boolean isCapped() {
-            return capped;
-        }
-    }
 }