-
1. Re: Wrong dependency info after module uninstall
adrian.brock Feb 18, 2008 12:37 PM (in response to alesj)Two points.
1) Does the same problem exist in the new code? I don't understand your description
about overriding a method with the same name.
2) Does IncompleteDeploymentException use the toHumanReadableString()
method on the DependecyItem? -
2. Re: Wrong dependency info after module uninstall
alesj Feb 18, 2008 3:44 PM (in response to alesj)"adrian@jboss.org" wrote:
1) Does the same problem exist in the new code? I don't understand your description
about overriding a method with the same name.
Yup, the problem is still there.
Just run the test case, and tell what is the real missing dependency. :-)
What I meant with overriding is that unresolved from RequirementDI should override the unresolved(Controller) method from AbstractDI, which is what gets called when doing the uninstall.
Probably that's what was already intended in the first place, but we changed the signature of unresolved when introducing cardinality on callbacks.
The method went from (void + no params) to (boolean + Controller param). And RequirementsDI's unresolved is equal to the first/initial usage."adrian@jboss.org" wrote:
2) Does IncompleteDeploymentException use the toHumanReadableString()
method on the DependecyItem?
Yes.
Once the iDependOn is nullified, this will get used in DeployersImpl.checkControllerContext method.Object iDependOn = item.getIDependOn(); if (iDependOn == null) { dependency = "<UNKNOWN>"; actualStateString = "** UNRESOLVED " + item.toHumanReadableString() + " **"; }
-
3. Re: Wrong dependency info after module uninstall
adrian.brock Feb 19, 2008 6:48 AM (in response to alesj)Ok, now I've seen the commit, I understand what you are talking about.
You changed the api in an incompatible way and didn't update the class hierarchy.
There is a similar issue with the demand dependency which is the original
version of depending on an abstract concept and what I copied to create
the RequirementDependencyItem..
I've added @Override to the methods to ensure they are actually overridding
things, but more importantly, I've changed the AbstractDependencyItem
to do what you should have done in the first place:
Compatible change:// Old method possibly overridden by subclasses public void unresolved() { if (resolved) { resolved = false; flushJBossObjectCache(); log.trace("Forced unresolved " + this); } } // New method just calls the old method public boolean unresolved(Controller controller) { unresolved(); return true; }