You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2008/07/07 21:59:44 UTC
svn commit: r674614 -
/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
Author: dwoods
Date: Mon Jul 7 12:59:44 2008
New Revision: 674614
URL: http://svn.apache.org/viewvc?rev=674614&view=rev
Log:
GERONIMO-4166 EAR missing dependency on j2ee-security breaks Server Console. Ported from trunk r674613.
Modified:
geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=674614&r1=674613&r2=674614&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Mon Jul 7 12:59:44 2008
@@ -56,9 +56,15 @@
import org.apache.geronimo.kernel.repository.Artifact;
import org.apache.geronimo.kernel.repository.MissingDependencyException;
import org.apache.geronimo.management.geronimo.WebModule;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+/**
+ * @version $Rev$ $Date$
+ */
public class ConfigManagerPortlet extends BasePortlet {
-
+ private final static Log log = LogFactory.getLog(ConfigManagerPortlet.class);
+
private static final String START_ACTION = "start";
private static final String STOP_ACTION = "stop";
@@ -167,14 +173,14 @@
} catch (NoSuchConfigException e) {
// ignore this for now
message(actionResponse, null, "Configuration not found<br /><br />");
- throw new PortletException("Configuration not found", e);
+ log.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);
+ log.error("Lifecycle operation failed ", e);
} catch (Exception e) {
message(actionResponse, null, "Encountered an unhandled exception<br /><br />");
- throw new PortletException("Exception", e);
+ log.error("Exception", e);
}
}
@@ -243,18 +249,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 +283,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);
}