[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: beanfactory injection

alesj do-not-reply at jboss.com
Tue Mar 25 11:24:26 EDT 2008


"alesj" wrote : "adrian at jboss.org" wrote : 
  |   | We should add something to the "toHumanReadableString()" for the "anonymous inject" to ask whether they intended that it or just forgot to give a bean name. :-)
  |   | 
  |   | 
  |   |   | Bean2TypePool -> injection by interface org.jboss.beans.metadata.spi.factory.BeanFactory (or did you forget to supply a bean name for the injection?) {Installed:** NOT FOUND **}
  |   |   | 
  |   | 
  |   | Otherwise we're going to get lots of FAQs :-)
  | I'll update the toString/toHumanString for class dependency items.
This will require update to DeployersImpl:

  |                   dependency = iDependOn.toString();
  |                   ControllerContext other = controller.getContext(iDependOn, null);
  |                   if (other == null)
  |                      actualStateString = "** NOT FOUND **";
  | 
I guess this is what we want:

  | actualStateString = "** NOT FOUND " + item.toHumanReadableString() + " **";
  | 

On a different note, looking at 

  |                Object iDependOn = item.getIDependOn();
  |                if (iDependOn == null)
  |                {
  |                   dependency = "<UNKNOWN>";
  |                   actualStateString = "** UNRESOLVED " + item.toHumanReadableString() + " **";
  |                }
  | 
and a default impl of toHumanReadableString

  |    public String toHumanReadableString()
  |    {
  |       StringBuilder builder = new StringBuilder();
  |       builder.append("Depends on '").append(getIDependOn());
  |       return builder.toString();
  |    }
  | 
it seams meaningless, since getIDependOn will return null. :-)
OK, but that's impl detail. ;-)

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

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



More information about the jboss-dev-forums mailing list