[jboss-dev-forums] [Design the new POJO MicroContainer] - beanfactory injection

scott.stark@jboss.org do-not-reply at jboss.com
Mon Mar 24 02:54:55 EDT 2008


The org.jboss.test.kernel.deployment.test.BeanContainerUsageTestCase which has this xml deployment:


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |             xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
  |             xmlns="urn:jboss:bean-deployer">
  | 
  |    <beanfactory name="Bean1TypeFactory" class="org.jboss.test.kernel.deployment.support.container.Bean1Type"/>
  |    <bean name="Bean1TypePool" class="org.jboss.test.kernel.deployment.support.container.BeanPool">
  |       <property name="factory"><inject name="Bean1TypeFactory"/></property>
  |    </bean>
  |    <bean name="BeanContainer1Type" class="org.jboss.test.kernel.deployment.support.container.BeanContainer">
  |       <property name="pool"><inject name="Bean1TypePool"/></property>
  |    </bean>
  |    <beanfactory name="Bean2TypeFactory" class="org.jboss.test.kernel.deployment.support.container.Bean2Type">
  |       <property name="bean1"><value-factory bean="Bean1TypeFactory" method="createBean" /></property>
  |    </beanfactory>
  |    <bean name="Bean2TypePool" class="org.jboss.test.kernel.deployment.support.container.BeanPool">
  |       <property name="factory"><inject name="Bean2TypeFactory"/></property>
  |    </bean>
  |    <bean name="BeanContainer2Type" class="org.jboss.test.kernel.deployment.support.container.BeanContainer">
  |       <property name="pool"><inject name="Bean2TypePool"/></property>
  |    </bean>
  | 
  | </deployment>
  | 

is failing because of a class dependency on the org.jboss.beans.metadata.spi.factory.BeanFactory type being injected into the bean pool:


  | java.lang.IllegalStateException: Incompletely deployed:
  | 
  | *** DEPLOYMENTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
  | Bean2TypePool -> interface org.jboss.beans.metadata.spi.factory.BeanFactory{Installed:** NOT FOUND **}
  | 
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:290)
  | 	at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:177)
  | 	at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.validate(MicrocontainerTestDelegate.java:262)
  | 	at org.jboss.test.kernel.junit.MicrocontainerTest.afterSetUp(MicrocontainerTest.java:98)
  | 	at org.jboss.test.kernel.junit.MicrocontainerTest.setUp(MicrocontainerTest.java:83)
  | 

I assume its because there is a failure to understand that Bean1TypeFactory provides the BeanFactory?


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

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



More information about the jboss-dev-forums mailing list