modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerOperationsDelegate.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit feb01f468685e7cedfa0938b759cc3a4102f9b1d Author: Jirka Kremser jkremser@redhat.com Date: Mon Oct 1 14:15:15 2012 +0200
[BZ 857423 - [EAP 5.1.2] inconsistent result of shut down operation when using JMX and shutdown.sh script and server is already stopped.] Check for return code was added.
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerOperationsDelegate.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerOperationsDelegate.java index 60fa42d..b96a2cc 100644 --- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerOperationsDelegate.java +++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerOperationsDelegate.java @@ -402,9 +402,11 @@ public class ApplicationServerOperationsDelegate { ProcessExecutionResults results = systemInfo.executeProcess(processExecution); logExecutionResults(results);
- if (results.getError() != null) { - throw new ExecutionFailedException("Error executing shutdown script while stopping AS instance. Exit code [" - + results.getExitCode() + "]: " + results.getError().getMessage(), results.getError()); + if (results.getError() != null || results.getExitCode() != 0) { + throw new ExecutionFailedException( + "Error executing shutdown script while stopping AS instance. Shutdown script returned exit code [" + + results.getExitCode() + "]" + + (results.getError() != null ? ": " + results.getError().getMessage() : ""), results.getError()); }
return "The server has been shut down.";
rhq-commits@lists.fedorahosted.org