[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Way to control when injection happens?

scott.stark@jboss.org do-not-reply at jboss.com
Tue Oct 14 12:15:11 EDT 2008


I added that to the mc FAQ (https://www.jboss.org/community/docs/DOC-10669) so the question now is the difference between depend and demand.

Looking at AbstractDemandMetaData and AbstractDependencyMetaData, a depend is a dependencyItem on the referenced bean reaching its Start state before the dependee will be allowed to reach its Start state.

Demand is a  dependencyItem on the referenced bean reaching its Installed state before the dependee will be allowed to reach its whenRequired(state attribute of demand) state.

Correct? Is there a full generalization super-depend element, whenRequired=X, dependentState=Y? The AbstractDependencyItem class supports this information.


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

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



More information about the jboss-dev-forums mailing list