Package org.jboss.beans.metadata.plugins.factory

Examples of org.jboss.beans.metadata.plugins.factory.GenericBeanFactory.createBean()


      factory1 = (GenericBeanFactory) context1.getTarget();
      bean1 = (SimpleBean) factory1.createBean();
      assertEquals("String1", bean1.getString());
     
      factory2 = (GenericBeanFactory) context2.getTarget();
      bean2 = (SimpleBeanWithConstructorDependency) factory2.createBean();
      assertNotNull(bean2);
      assertEquals("String2", bean2.getString());
      assertEquals(factory1, bean2.getFactory());
   }
View Full Code Here


      SimplerBean bean1 = (SimplerBean) context1.getTarget();
      assertNotNull(bean1);
      assertEquals("String1", bean1.getString());
     
      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimplerBean bean2 = (SimplerBean) factory.createBean();
      assertNotNull(bean2);
      assertEquals("String1", bean2.getString());
   }

   public void propertyDependencyCorrectOrder() throws Throwable
View Full Code Here

      SimplerBean bean1 = (SimplerBean) context1.getTarget();
      assertNotNull(bean1);
      assertEquals("String1", bean1.getString());
     
      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimplerBean bean2 = (SimplerBean) factory.createBean();
      assertNotNull(bean2);
      assertEquals("String1", bean2.getString());
   }

   public void propertyDependencyWrongOrder() throws Throwable
View Full Code Here

      SimplerBean bean1 = (SimplerBean) context1.getTarget();
      assertNotNull(bean1);
      assertEquals("String1", bean1.getString());
     
      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimplerBean bean2 = (SimplerBean) factory.createBean();
      assertNotNull(bean2);
      assertEquals("String1", bean2.getString());

      assertUninstall("Name1");
View Full Code Here

      bean1 = (SimplerBean) context1.getTarget();
      assertNotNull(bean1);
      assertEquals("String1", bean1.getString());
     
      factory = (GenericBeanFactory) context2.getTarget();
      bean2 = (SimplerBean) factory.createBean();
      assertNotNull(bean2);
      assertEquals("String1", bean2.getString());
     
      assertUninstall("Name2");
     
View Full Code Here

      bean1 = (SimplerBean) context1.getTarget();
      assertNotNull(bean1);
      assertEquals("String1", bean1.getString());
     
      factory = (GenericBeanFactory) context2.getTarget();
      bean2 = (SimplerBean) factory.createBean();
      assertNotNull(bean2);
      assertEquals("String1", bean2.getString());
   }

   public void propertyDependencyReinstall() throws Throwable
View Full Code Here

     
      SimpleBeanWithLifecycle bean1 = (SimpleBeanWithLifecycle) context1.getTarget();
      assertNotNull(bean1);

      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimpleBeanWithLifecycle bean2 = (SimpleBeanWithLifecycle) factory.createBean();
      assertNotNull(bean2);
     
      assertEquals(1, bean1.createOrder);
      assertEquals(2, bean1.startOrder);
      assertEquals(3, bean2.createOrder);
View Full Code Here

     
      SimpleBeanWithLifecycle bean1 = (SimpleBeanWithLifecycle) context1.getTarget();
      assertNotNull(bean1);
     
      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimpleBeanWithLifecycle bean2 = (SimpleBeanWithLifecycle) factory.createBean();
      assertNotNull(bean2);
     
      assertEquals(1, bean1.createOrder);
      assertEquals(2, bean1.startOrder);
      assertEquals(3, bean2.createOrder);
View Full Code Here

     
      SimpleBeanWithLifecycle bean1 = (SimpleBeanWithLifecycle) context1.getTarget();
      assertNotNull(bean1);
     
      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimpleBeanWithLifecycle bean2 = (SimpleBeanWithLifecycle) factory.createBean();
      assertNotNull(bean2);
     
      assertEquals(1, bean1.createOrder);
      assertEquals(2, bean1.startOrder);
      assertEquals(3, bean2.createOrder);
View Full Code Here

      assertInstall(0, "simple");
      ControllerContext context2 = assertInstall(1, "aspect");

      GenericBeanFactory factory = (GenericBeanFactory) context2.getTarget();
      SimpleBeanWithDependency bean = (SimpleBeanWithDependency) factory.createBean();
      assertEquals("factory", bean.getString());
      assertEquals("String1", bean.getSimpleBean().getString());
   }

   public void genericBeanFactoryDependencyCorrectOrder()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.