[jboss-cvs] JBossAS SVN: r91096 - projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jul 10 11:18:55 EDT 2009
Author: alesj
Date: 2009-07-10 11:18:55 -0400 (Fri, 10 Jul 2009)
New Revision: 91096
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/deployers/DeployersImpl.java
Log:
[JBDEPLOY-203]; fix wrong state usage bug.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/deployers/DeployersImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/deployers/DeployersImpl.java 2009-07-10 15:18:23 UTC (rev 91095)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/deployers/DeployersImpl.java 2009-07-10 15:18:55 UTC (rev 91096)
@@ -894,15 +894,17 @@
{
if (item.isResolved() == false)
{
- String dependency;
ControllerState actualState = null;
String actualStateString;
Object iDependOn = item.getIDependOn();
if (contextName.equals(iDependOn) == false && item.resolve(controller) == false)
{
+ // some items might only set iDependOn later on
iDependOn = item.getIDependOn();
+ String dependency;
+ ControllerContext other = null;
if (iDependOn == null)
{
dependency = "<UNKNOWN " + item.getName() + ">";
@@ -911,7 +913,7 @@
else
{
dependency = iDependOn.toString();
- ControllerContext other = controller.getContext(iDependOn, null);
+ other = controller.getContext(iDependOn, null);
if (other == null)
actualStateString = "** NOT FOUND " + item.toHumanReadableString() + " **";
else
@@ -921,10 +923,13 @@
}
}
- ControllerState requiredState = item.getWhenRequired();
- String requiredStateString = requiredState.getStateString();
- if (actualState == null || states.isAfterState(requiredState, actualState))
+ ControllerState requiredState = item.getDependentState();
+ if (requiredState == null)
+ requiredState = (other != null) ? other.getRequiredState() : ControllerState.INSTALLED;
+
+ if (actualState == null || states.isBeforeState(actualState, requiredState))
{
+ String requiredStateString = requiredState.getStateString();
MissingDependency missing = new MissingDependency(name, dependency, requiredStateString, actualStateString);
dependencies.add(missing);
}
More information about the jboss-cvs-commits
mailing list