[jboss-user] [JBoss Microcontainer Development] New message: "Re: JBDEPLOY-226 - DeployerClient change extension"

Adrian Brock do-not-reply at jboss.com
Wed Feb 24 09:39:45 EST 2010

User development,

A new message was posted in the thread "JBDEPLOY-226 - DeployerClient change extension":


Author  : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org

> alesj wrote:
> I see we're on the same page -- this feature is just a nicer API, done width first.
> I was just wondering if you're tackling the circular references problem.
> ((ab)using this thread to check up on you )
Nope. But that probably needs resolving (pun intended) in the jboss-dependency project?
Currently a DependencyItem knows what it wants to resolve against and just checks whether it is in the correct state.
If however this leads to a circular dependency, nothing moves.
A depends upon B at CLASSLOADER
B depends upon A at CLASSLOADER
For A,
ControllerContext context = controller.getContext(B, CLASSLOADER);
will return null and the same for B with respect to A.
Instead, what is required is some api within the DependencyInfo/Item to say, well actually I will return a context because
the only thing that is stopping them moving is the circular dependency.
Something like:
RequirementDependencyItem extends AbstractDependencyItem
   public boolean resolve(Controller)
       Module module = resolveModule();
       // Now we know what we want to resolve to
       if (module != null)
          ControllerContext ctx = module.getControllerContext();
          boolean resolved = doesTheOtherContextAndItsTransientsHaveCompletelyUnresolvedDependenies(ctx, getDependentState()); // i.e. not resolved at all rather resolved or semi-resolved
          // etc.
I can prototype this in the ClassLoading project, but I think it is a general requirement?
NOTE: This feature is only possible for a dependency where the underlying model can handle circular dependencies.
e.g. constructors on pojos can't do it
But the classloading can, since it can lazily wire the classloaders together using the ClassLoaderPolicyFactory on the DelegateLoader.


To reply to this message visit the message page: http://community.jboss.org/message/528201#528201

More information about the jboss-user mailing list