[jboss-cvs] jboss-cvs-commits Digest, Vol 39, Issue 11
Ales Justin
ales.justin at gmail.com
Tue Sep 1 15:45:27 EDT 2009
> Modified: projects/jboss-cl/branches/Branch_2_0/classloading/src/main/java/org/jboss/classloading/spi/dependency/RequirementDependencyItem.java
> ===================================================================
> --- projects/jboss-cl/branches/Branch_2_0/classloading/src/main/java/org/jboss/classloading/spi/dependency/RequirementDependencyItem.java 2009-09-01 16:43:27 UTC (rev 93080)
> +++ projects/jboss-cl/branches/Branch_2_0/classloading/src/main/java/org/jboss/classloading/spi/dependency/RequirementDependencyItem.java 2009-09-01 18:50:59 UTC (rev 93081)
> @@ -56,7 +56,7 @@
> */
> public RequirementDependencyItem(Module module, Requirement requirement, ControllerState state)
> {
> - super(module != null ? module.getContextName() : null, null, state, ControllerState.INSTALLED);
> + super(module != null ? module.getContextName() : null, null, state, state);
This is not right.
state in this case in "when required" state, which is not related to
dependent state.
You should create new parameter in ctor.
> if (requirement == null)
> {
> - // [TODO] check actually changed state
> - deployerClient.change(bundleState.getDeploymentUnit().getName(), DeploymentStages.CLASSLOADER);
> + String name = bundleState.getDeploymentUnit().getName();
> + deployerClient.change(name, DeploymentStages.CLASSLOADER);
> + deployerClient.checkComplete(name);
> + bundleState.changeState(Bundle.RESOLVED);
> return true;
This should be a temp workaround, until we introduce proper methods to api.
Which would make this work w/o throw/catch exception + less stuff to check.
More information about the jboss-cvs-commits
mailing list