[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Scoped beans deployment

adrian@jboss.org do-not-reply at jboss.com
Wed Feb 14 08:51:11 EST 2007


NOTE: If you look at AbstractDependencyInfo, you'll see that it only invokes
the dependency items for the next state that it is interested in.


  |    public boolean resolveDependencies(Controller controller, ControllerState state)
  |    {
  |       boolean resolved = true;
  |       if (unresolved.isEmpty() == false)
  |       {
  |          for (Iterator i = unresolved.iterator(); i.hasNext();)
  |          {
  |             DependencyItem item = (DependencyItem) i.next();
  | 
  | // HERE, only try to resolve the next state, not all dependencies
  | 
  |             if (state.equals(item.getWhenRequired()) && item.resolve(controller) == false)
  |             {
  |                resolved = false;
  |                break;
  |             }
  |          }
  |       }
  |       return resolved;
  |    }
  | 

So when we ask is "PRE_INSTALL" resolved, it isn't going to look at later dependencies.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016377#4016377

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016377



More information about the jboss-dev-forums mailing list