[jboss-cvs] JBossAS SVN: r70993 - projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/plugins.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 19 08:03:40 EDT 2008
Author: adrian at jboss.org
Date: 2008-03-19 08:03:40 -0400 (Wed, 19 Mar 2008)
New Revision: 70993
Modified:
projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/plugins/AbstractController.java
Log:
This is not an error - also make sure we have the correct current state after dependency callouts
Modified: projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/plugins/AbstractController.java
===================================================================
--- projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/plugins/AbstractController.java 2008-03-19 11:45:07 UTC (rev 70992)
+++ projects/microcontainer/trunk/dependency/src/main/org/jboss/dependency/plugins/AbstractController.java 2008-03-19 12:03:40 UTC (rev 70993)
@@ -991,10 +991,18 @@
}
}
+ // The state could have changed while calling out to dependents
+ fromState = context.getState();
+ if (ControllerState.ERROR.equals(fromState))
+ return;
+
+ // Calculate the previous state
+ currentIndex = states.indexOf(fromState);
int toIndex = currentIndex - 1;
- if (toIndex == -1)
+ if (toIndex < 0)
{
- context.setError(new IllegalStateException("Cannot uninstall from " + fromState));
+ // This is hack, we signal true uninstalled status by putting it in the error state
+ context.setState(ControllerState.ERROR);
return;
}
More information about the jboss-cvs-commits
mailing list