[jboss-user] [Microcontainer] - Howto inject beans into a collection

Welle do-not-reply at jboss.com
Sun Feb 22 16:02:10 EST 2009


Hi all,

I just started looking at the Microcontainer and wonder how I should inject beans into a collection (List) that is a property to another bean?

I can't find any examples how this should be done (if possible).


  | <bean name="a" class="xxx.xxx.A">
  |    <property name="listOfB">
  |       <list elementClass="xxx.xxx.B">
  |          <value><inject bean="b1"/></value>
  |          <value><inject bean="b2"/></value>
  |          <value><inject bean="b3"/></value>
  |       </list>
  |     </property>
  | </bean>
  | 
  | <bean name="b1" class="xxx.xxx.B">...</bean>
  | <bean name="b2" class="xxx.xxx.B">...</bean>
  | <bean name="b3" class="xxx.xxx.B">...</bean>
  | 	


Best regards
Anders


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

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



More information about the jboss-user mailing list