geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r674613 - /geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
Date Mon, 07 Jul 2008 19:57:38 GMT
Author: dwoods
Date: Mon Jul  7 12:57:37 2008
New Revision: 674613

URL: http://svn.apache.org/viewvc?rev=674613&view=rev
Log:
GERONIMO-4166 EAR missing dependency on j2ee-security breaks Server Console.  Thanks Manu
for the patch.

Modified:
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=674613&r1=674612&r2=674613&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
(original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
Mon Jul  7 12:57:37 2008
@@ -56,9 +56,13 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
 import org.apache.geronimo.management.geronimo.WebModule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ConfigManagerPortlet extends BasePortlet {
 
+    private static final Logger logger = LoggerFactory.getLogger(ConfigManagerPortlet.class);
+    
     private static final String START_ACTION = "start";
 
     private static final String STOP_ACTION = "stop";
@@ -167,14 +171,14 @@
         } catch (NoSuchConfigException e) {
             // ignore this for now
             message(actionResponse, null, "Configuration not found<br /><br />");
-            throw new PortletException("Configuration not found", e);
+            logger.error("Configuration not found", e);
         } catch (LifecycleException e) {
             // todo we have a much more detailed report now
             message(actionResponse, null, "Lifecycle operation failed<br /><br />");
-            throw new PortletException("Exception", e);
+            logger.error("Lifecycle operation failed ", e);
         } catch (Exception e) {
             message(actionResponse, null, "Encountered an unhandled exception<br /><br
/>");
-            throw new PortletException("Exception", e);
+            logger.error("Exception", e);
         }
     }
 
@@ -243,18 +247,20 @@
                         boolean loaded = loadModule(configManager, configObjName);
 
                         Configuration config = configManager.getConfiguration(info.getConfigID());
-                        for (Configuration child : config.getChildren()) {
-                            if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
-                                ModuleDetails childDetails = new ModuleDetails(info.getConfigID(),
child.getModuleType(), info.getState());
-                                childDetails.setComponentName(child.getId().toString());
-                                WebModule webModule = getWebModule(config, child);
-                                if (webModule != null) {
-                                    childDetails.getContextPaths().add(webModule.getContextPath());
-                                }
-                                if (showDependencies) {
-                                    addDependencies(childDetails, configObjName);
+                        if(config != null){
+                            for (Configuration child : config.getChildren()) {
+                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
+                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(),
child.getModuleType(), info.getState());
+                                    childDetails.setComponentName(child.getId().toString());
+                                    WebModule webModule = getWebModule(config, child);
+                                    if (webModule != null) {
+                                        childDetails.getContextPaths().add(webModule.getContextPath());
+                                    }
+                                    if (showDependencies) {
+                                        addDependencies(childDetails, configObjName);
+                                    }
+                                    moduleDetails.add(childDetails);
                                 }
-                                moduleDetails.add(childDetails);
                             }
                         }
 
@@ -275,21 +281,22 @@
 
                     if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue())
{
                         Configuration config = configManager.getConfiguration(info.getConfigID());
-                        Iterator childs = config.getChildren().iterator();
-                        while (childs.hasNext()) {
-                            Configuration child = (Configuration) childs.next();
-                            if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
-                                WebModule webModule = getWebModule(config, child);
-                                if (webModule != null) {
-                                    details.getContextPaths().add(webModule.getContextPath());
+                        if(config != null){
+                            Iterator childs = config.getChildren().iterator();
+                            while (childs.hasNext()) {
+                                Configuration child = (Configuration) childs.next();
+                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue())
{
+                                    WebModule webModule = getWebModule(config, child);
+                                    if (webModule != null) {
+                                        details.getContextPaths().add(webModule.getContextPath());
+                                    }
                                 }
+                            }                                            
+                            if (showDependencies) {
+                                addDependencies(details, configObjName);
                             }
                         }
                     }
-
-                    if (showDependencies) {
-                        addDependencies(details, configObjName);
-                    }
                     if (loaded) {
                         unloadModule(configManager, configObjName);
                     }



Mime
View raw message