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 2007/05/23 04:13:38 UTC
svn commit: r540803 - in /geronimo/server/trunk/modules:
geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/
geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/
geronimo-kernel/src/main/java/org/apache/gero...
Author: dwoods
Date: Tue May 22 19:13:37 2007
New Revision: 540803
URL: http://svn.apache.org/viewvc?view=rev&rev=540803
Log:
GERONIMO-3183 Fix offline deployment in minimal configurations. Applied the second-half of the patch, which adds some improved diagnostics. Offline deployment still fails in the minimal assemblies....
Modified:
geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListModules.java
geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListTargets.java
geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?view=diff&rev=540803&r1=540802&r2=540803
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java (original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java Tue May 22 19:13:37 2007
@@ -144,6 +144,11 @@
if (kernel == null) {
throw new IllegalStateException("Disconnected");
}
+
+ if (targetList == null) {
+ return null;
+ }
+
try {
ArrayList<TargetModuleIDImpl> result = new ArrayList<TargetModuleIDImpl>();
for (Target aTargetList : targetList) {
Modified: geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListModules.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListModules.java?view=diff&rev=540803&r1=540802&r2=540803
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListModules.java (original)
+++ geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListModules.java Tue May 22 19:13:37 2007
@@ -81,13 +81,14 @@
// targets print that count, too
int total = running.length+notrunning.length;
out.print("Found "+total+" module"+(total != 1 ? "s" : ""));
- if (tlist.length > 1)
+ if ((tlist != null) && (tlist.length > 1)) {
out.println(" deployed to " + tlist.length + " target" + (tlist.length != 1 ? "s" : ""));
- else
+ } else {
out.println("");
+ }
// for each target, print the modules that were deployed to it
- for (int i = 0; i < tlist.length; i++) {
+ for (int i = 0; (tlist != null) && (i < tlist.length); i++) {
Target target = tlist[i];
if (tlist.length > 1)
out.println("\n Target " + target);
Modified: geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListTargets.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListTargets.java?view=diff&rev=540803&r1=540802&r2=540803
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListTargets.java (original)
+++ geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListTargets.java Tue May 22 19:13:37 2007
@@ -33,10 +33,14 @@
public void execute(PrintWriter out, ServerConnection connection, CommandArgs commandArgs) throws DeploymentException {
Target[] list = connection.getDeploymentManager().getTargets();
- out.println("Available Targets:");
- for(int i = 0; i < list.length; i++) {
- Target target = list[i];
- out.println(" "+target.getName());
+ if ((list == null) || (list.length == 0)) {
+ out.println("No available targets.");
+ } else {
+ out.println("Available Targets:");
+ for (int i = 0; i < list.length; i++) {
+ Target target = list[i];
+ out.println(" "+target.getName());
+ }
}
}
}
Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?view=diff&rev=540803&r1=540802&r2=540803
==============================================================================
--- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java (original)
+++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java Tue May 22 19:13:37 2007
@@ -299,7 +299,12 @@
throw new IllegalStateException("A Configuration Manager could not be found in the kernel");
}
if (names.size() > 1) {
- throw new IllegalStateException("More than one Configuration Manager was found in the kernel");
+ String error = "More than one Configuration Manager was found in the kernel: ";
+ for (Object name : names) {
+ AbstractName abName = (AbstractName)name;
+ error = error + "\"" + abName.toString() + "\" ";
+ }
+ throw new IllegalStateException(error);
}
return (AbstractName) names.iterator().next();
}