[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: expressing dependent states

jhalliday do-not-reply at jboss.com
Wed May 21 11:37:38 EDT 2008


Hmm, presumably injecting it as a parameter to some lifecycle method ensures the property has actually been configured correctly (ORBService may setORB(...) in e.g. startService()), whereas injecting it as a property on the bean does not. Property injection is built on the assumption that a bean's properties are initialized at bean creation time I guess? Besides, if I inject it as a property of my bean, I may be tempted to use it in create() rather than start(), which would be against the guidelines I think.  So the correct approach would seem to be


  | <start>
  |    <parameter><inject bean="ORBService" property="ORB"/></parameter>
  | </start>
  | 

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

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



More information about the jboss-dev-forums mailing list