4 Replies Latest reply on Apr 4, 2007 11:00 AM by Ales Justin

    Bean as a value to a deployment level classloader

    Adrian Brock Master

      This test is failing because there is no "rewrite" of the ClassLoaderMetaData
      to unwrap the embedded BeanMetaDataFactory.

      java.lang.IllegalStateException: Bean not found cl at state ControllerState@120d62b{Installed}
       at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.getControllerContext(MicrocontainerTestDelegate.java:152)
       at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.getBean(MicrocontainerTestDelegate.java:125)
       at org.jboss.test.kernel.junit.MicrocontainerTest.getBean(MicrocontainerTest.java:93)
       at org.jboss.test.kernel.junit.MicrocontainerTest.getBean(MicrocontainerTest.java:80)
       at org.jboss.test.kernel.deployment.test.BeanMetaDataWithClassloaderTestCase.testBeanAsValueMetaData(BeanMetaDataWithClassloaderTestCase.java:48)
      


      i.e. replace
       <classloader>
       <bean name="cl" class="org.jboss.test.kernel.deployment.support.NullClassLoader" />
       </classloader>
      


      with

       <classloader>
       <inject bean="cl"/>
       </classloader>
      
       <bean name="cl" class="org.jboss.test.kernel.deployment.support.NullClassLoader" />
      


      This needs to get done somewhere in AbstractKernelDeployer.deployBeans()
      with deployBean() using any modified version.

      We don't want to modify the ClassLoaderMetaData set on the deployment by the user!