You're talking about old IOC style programming
i.e. registry.getBean(name);
I don't like this form of IOC since it means you are tied to the container api
and therefore not portable across IOC containers.
It should be discourged. The best way to get the bean is to inject it. :-)
But if you are going to do it, then you're better off using something like the
locator
pattern examples I did in the initial user guide.
Either:
* Use the MC to build up a singleton hashtable name->object
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontaine...
* Use the MC directly as the implementation detail of the locator
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontaine...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143262#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...