Package org.jboss.kernel.spi.dependency

Examples of org.jboss.kernel.spi.dependency.KernelController.install()


   public void testInheritance() throws Throwable
   {
      KernelController controller = getController();
      AbstractBeanMetaData bmd1 = new AbstractBeanMetaData("deployer", Object.class.getName());
      controller.install(bmd1);
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("demander", Object.class.getName());
      builder.addDemand("somesupply");
      controller.install(builder.getBeanMetaData());
      runAnnotationsOnClass(SubSetsAnnotationTester.class);
      controller.install(new AbstractBeanMetaData("setssupplier", SetsAnnotationTester.class.getName()));
View Full Code Here


      KernelController controller = getController();
      AbstractBeanMetaData bmd1 = new AbstractBeanMetaData("deployer", Object.class.getName());
      controller.install(bmd1);
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("demander", Object.class.getName());
      builder.addDemand("somesupply");
      controller.install(builder.getBeanMetaData());
      runAnnotationsOnClass(SubSetsAnnotationTester.class);
      controller.install(new AbstractBeanMetaData("setssupplier", SetsAnnotationTester.class.getName()));
      checkDemander(ControllerState.INSTALLED);
   }
View Full Code Here

      controller.install(bmd1);
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("demander", Object.class.getName());
      builder.addDemand("somesupply");
      controller.install(builder.getBeanMetaData());
      runAnnotationsOnClass(SubSetsAnnotationTester.class);
      controller.install(new AbstractBeanMetaData("setssupplier", SetsAnnotationTester.class.getName()));
      checkDemander(ControllerState.INSTALLED);
   }

   protected void doTestAfterInstall()
   {
View Full Code Here

      String name = target != null ? target.toString() : (className + System.currentTimeMillis());
      AbstractBeanMetaData beanMetaData = new AbstractBeanMetaData(name, className);
      beanMetaData.setAccessMode(mode);
      try
      {
         KernelControllerContext context = controller.install(beanMetaData, target);
         checkContextState(clazz, context);
         if (target == null)
            target = clazz.cast(context.getTarget());
         doTestAfterInstall(clazz, target);
      }
View Full Code Here

      SimpleBean bean = new SimpleBean();
     
      AbstractBeanMetaData metaData = new AbstractBeanMetaData("Name1", bean.getClass().getName());
     
      KernelControllerContext context = controller.install(metaData, bean);
      assertEquals(ControllerState.INSTALLED, context.getState());
     
      assertEquals(bean, context.getTarget());
     
      controller.uninstall("Name1");
View Full Code Here

     
      controller.uninstall("Name1");
     
      assertEquals(bean, context.getTarget());
     
      context = controller.install(metaData, bean);
      assertEquals(ControllerState.INSTALLED, context.getState());
     
      assertEquals(bean, context.getTarget());
   }
}
View Full Code Here

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(abmd);
      AbstractPropertyMetaData property = new AbstractPropertyMetaData("something", builder.createMap(null, String.class.getName(), String.class.getName()));
      property.setPropertyType(Map.class.getName());
      abmd.addProperty(property);

      KernelControllerContext context = controller.install(builder.getBeanMetaData());
      controller.change(context, ControllerState.INSTANTIATED);
      assertEquals(ControllerState.INSTANTIATED, context.getState());
      assertFalse(describe.error);
   }
View Full Code Here

            .addDestroyParameter(String.class.getName(), "ParamDestroy");
      BeanMetaData beanMetaData = builder.getBeanMetaData();

      KernelController controller = kernel.getController();

      KernelControllerContext context = controller.install(beanMetaData);
      SimpleLifecycleBean slb = (SimpleLifecycleBean)context.getTarget();

      assertNotNull(slb);
      assertEquals("ParamCreate", slb.getCreate());
      assertEquals("ParamStart", slb.getStart());
View Full Code Here

            .addUninstall("uninstallParam", String.class.getName(), "Uninstall");
      BeanMetaData beanMetaData = builder.getBeanMetaData();

      KernelController controller = kernel.getController();

      KernelControllerContext context = controller.install(beanMetaData);
      SimpleLifecycleBean slb = (SimpleLifecycleBean)context.getTarget();

      assertNotNull(slb);
      assertEquals("Install", slb.getInstall());
View Full Code Here

      Kernel kernel = bootstrap();
      KernelController controller = kernel.getController();
      try
      {
         beanMetaData = BeanMetaDataBuilder.createBuilder("t", TrimTransformer.class.getName()).getBeanMetaData();
         cc = controller.install(beanMetaData);
         assertNotNull(cc);
         assertEquals(ControllerState.INSTALLED, cc.getState());
         target = cc.getTarget();
         assertNotNull(target);
         transformer = assertInstanceOf(target, Transformer.class);
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.