[jboss-svn-commits] JBL Code SVN: r30740 - labs/jbossesb/branches/JBESB_4_7_CP/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Dec 16 23:47:48 EST 2009
Author: tcunning
Date: 2009-12-16 23:47:48 -0500 (Wed, 16 Dec 2009)
New Revision: 30740
Modified:
labs/jbossesb/branches/JBESB_4_7_CP/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java
Log:
JBESB-3054
If we can't stop the deployment because of a wrapped NPE, then return
and pretend like the delete worked so that it will uninventory the ESB.
Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java 2009-12-16 23:51:41 UTC (rev 30739)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java 2009-12-17 04:47:48 UTC (rev 30740)
@@ -76,8 +76,17 @@
DeploymentProgress stop = deployMgr.stop(repositoryName);
stop.run();
if (stop != null) {
- DeploymentStatus stopStatus = stop.getDeploymentStatus();
+ DeploymentStatus stopStatus = stop.getDeploymentStatus();
if (stopStatus.isFailed()) {
+ if ((stopStatus.getFailure() != null) && (stopStatus.getFailure().getCause() != null)
+ && (stopStatus.getFailure().getCause() instanceof java.lang.NullPointerException)) {
+ // If we get a NPE here, it means that the .esb deployment has already been deleted
+ // Return here because otherwise JON will not update and remove the deployment
+ log.error("Failed to stop deployment '" + repositoryName + "'.", stopStatus.getFailure());
+
+ return;
+ }
+
log.error("Failed to stop deployment '" + repositoryName + "'.", stopStatus.getFailure());
throw new Exception("Failed to stop deployment '" + repositoryName + "' - cause: "
+ stopStatus.getFailure());
More information about the jboss-svn-commits
mailing list