[jboss-dev-forums] [Design the new POJO MicroContainer] - BeanFactory and IoC annotations support

alesj do-not-reply at jboss.com
Tue Mar 25 10:27:54 EDT 2008


Currently we don't do anything with MC IoC annotations on beans that are created by bean factory (e.g. GenericBeanFactory).

Handling them in createBean method is too late, since we loose the notion of dependencies, e.g. @Inject(bean="somebean") at that moment we can only do lookup and fail if 'somebean' is not installed, loosing what MC's state machine is all about.

We could move annotations lookup in create() and set the dependencies whenRequired state to INSTALLED.
But this will again only work if bean attribute is explicitly defined.
In the case when bean is created through ConstructorMetaData.factory, there is nothing we can do to avoid problems previously mentioned - no true dependencies.

Which road to take?

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

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



More information about the jboss-dev-forums mailing list