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

Welle do-not-reply at jboss.com
Mon Feb 23 02:54:07 EST 2009


Hmm... Perhaps I should mention that I trying to get it to work under JBoiss AS 5.


It doesn't seem to recognize the "inject" within a "value" element:

org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bean-deployer:2.0}inject not found as a child of {urn:jboss:bean-deployer:2.0}value

Here is my simple testclass B

package xxx.xxx.xxx;
  | 
  | import java.util.List;
  | 
  | public class B {
  | 
  |         private List actions = null;
  | 
  |         public void setActions(List actions) {
  |                 this.actions = actions;
  |         }
  | }

I also tried to create the bean within the "inject"  without luck.

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

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

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



More information about the jboss-user mailing list