bean = getBean("BeanConfiguredClassLoader");
assertEquals(beanCL, getClassLoader(bean.getClass()));
bean = getBean("NotConfiguredClassLoader");
assertEquals(getClassLoader(getClass()), getClassLoader(bean.getClass()));
BeanFactory factory = (BeanFactory) getBean("FactoryDeploymentConfiguredClassLoader");
bean = factory.createBean();
assertEquals(deploymentCL, getClassLoader(bean.getClass()));
factory = (BeanFactory) getBean("FactoryBeanConfiguredClassLoader");
bean = factory.createBean();
assertEquals(beanCL, getClassLoader(bean.getClass()));
factory = (BeanFactory) getBean("FactoryNotConfiguredClassLoader");
bean = factory.createBean();
assertEquals(getClassLoader(getClass()), getClassLoader(bean.getClass()));
}
finally
{
undeploy(deployment);