1 Reply Latest reply on Mar 21, 2007 3:48 PM by Ales Justin

    Collection Injection in the MC

    Weston M. Price Master

      I have a the following bean config

       <bean name="MCFBuilder" class="org.jboss.resource.deployers.builder.ManagedConnectionFactoryBuilder"/>
       <bean name="PoolBuilder" class="org.jboss.resource.deployers.builder.ManagedConnectionPoolBuilder"/>
       <bean name="ConnectionManagerBuilder" class="org.jboss.resource.deployers.builder.ConnectionManagerBuilder"/>
       <bean name="ConnectionFactoryBindingBuilder" class="org.jboss.resource.deployers.builder.ConnectionFactoryBindingBuilder"/>
       <bean name="MetaDataTypeMappingBuilder" class="org.jboss.resource.deployers.builder.MetaDataTypeMappingBuilder"/>
      
      <bean name="ManagedConnectionFactoryDeployer" class="org.jboss.resource.deployers.ManagedConnectionFactoryDeployer">
       <property name="repository"><inject bean="JCAMetaDataRepository"></inject></property>
       <property name="builders">
       <list>
       <value class="org.jboss.resource.deployers.builder.ManagedConnectionFactoryBuilder"><inject bean="MCFBuilder"/></value>
       </list>
       </property>
       <install bean="MainDeployer" method="addDeployer">
       <parameter><this/></parameter>
       </install>
       <uninstall bean="MainDeployer" method="removeDeployer">
       <parameter><this/></parameter>
       </uninstall>
       <property name="type">jca-ds</property>
       </bean>
      
      


      Basically all the builders simply extend an abstract class. I understand that I have to list the element class when doing something like this. When I try to deploy I get the fairly cryptic message on startup:


      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: {urn:jboss:bean-deployer:2.0}plainValueType type of element {urn:jboss:bean-deployer:2.0}value should be complex and contain {urn:jboss:bean-deployer:2.0}inject as a child element.
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:187)
       at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:147)
       at org.jboss.deployers.plugins.deployers.helpers.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:80)
       at org.jboss.deployers.plugins.deployers.helpers.AbstractParsingDeployer.parse(AbstractParsingDeployer.java:176)
       at org.jboss.deployers.plugins.deployers.helpers.AbstractParsingDeployer.createMetaData(AbstractParsingDeployer.java:114)
      
      


      I have tried a few different things but nothing seems to make the MC/JBossXB layer happy. Suggestions? I assume I am missing something as this is a pretty basic use case.