Package org.jboss.beans.metadata.spi.factory

Examples of org.jboss.beans.metadata.spi.factory.BeanFactory


      deployment.setName("test");
      deployment.setBeanFactories(Collections.singletonList((BeanMetaDataFactory) gbfmd));
      deploy(deployment);
      try
      {
         BeanFactory factory = assertBean("NonPrivileged", BeanFactory.class);
         try
         {
            factory.createBean();
            fail("Should not be here!");
         }
         catch (Throwable t)
         {
            checkThrowable(AccessControlException.class, t);
View Full Code Here


      checkLifecycleBean("LifecycleBean4", true, true);
   }

   protected void checkLifecycleBean(String name, boolean create, boolean start) throws Throwable
   {
      BeanFactory factory = (BeanFactory)getBean(name);
      assertNotNull(factory);
      SimpleLifecycleBean lifecycle = (SimpleLifecycleBean)factory.createBean();
      assertNotNull(lifecycle);
      assertEquals(create, lifecycle.isCreate());
      assertEquals(start, lifecycle.isStart());
   }
View Full Code Here

      ControllerContext testCCBF = controller.getInstalledContext("TestBF");
      assertNotNull(testCCBF);
      Object target = testCCBF.getTarget();
      assertInstanceOf(target, BeanFactory.class, false);
      BeanFactory bf = (BeanFactory)target;
      Object bfTarget = bf.createBean();
      assertNotNull(bfTarget);
      Class<?> bfTClass = bfTarget.getClass();
      assertTrue(bfTClass.isAnnotationPresent(org.jboss.beans.metadata.api.annotations.BeanFactory.class));

      assertUndeploy(context);
View Full Code Here

      if (factories == null)
         return null;


      BeanFactory factory = factories.get(command);
      if (factory != null)
      {
         try
         {
            Object result = factory.createBean();
            return Executable.class.cast(result);
         }
         catch (Throwable t)
         {
            throw new RuntimeException(t);
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.spi.factory.BeanFactory

Copyright © 2018 www.massapicom. 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.