Package org.jboss.kernel.spi.dependency

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


         builder.addAnnotation("@" + DeploymentScope.class.getName() + "(\"" + deployment + "\")");
      if (id > 0)
         builder.addAnnotation("@" + InstanceScope.class.getName() + "(\"id-" + Integer.toString(id) + "\")");

      KernelController controller = getController();
      return controller.install(builder.getBeanMetaData());
   }
}
View Full Code Here


   }

   public void testAnnotationsInjection() throws Throwable
   {
      KernelController controller = getController();
      controller.install(new AbstractBeanMetaData("supplier", RGBSupplier.class.getName()));

      runAnnotationsOnClass(RGBDemander.class, BeanAccessMode.ALL);
   }

   protected void doTestAfterInstall(Object target)
View Full Code Here

   }

   public void testWrongOrder() throws Throwable
   {
      KernelController controller = getController();
      ControllerContext context = controller.install(new AbstractBeanMetaData("si", SearchInjection.class.getName()));
      assertEquals(ControllerState.INSTANTIATED, context.getState());

      List<ControllerContext> contexts = new ArrayList<ControllerContext>();
      try
      {
View Full Code Here

      // Install the test instance itself into MC (so injections may be honored)
      final BeanMetaDataBuilder bmdb = BeanMetaDataBuilderFactory.createBuilder(BIND_NAME_TEST,
            testCase.getClass().getName()).setAccessMode(BeanAccessMode.ALL);
      try
      {
         controller.install(bmdb.getBeanMetaData(), testCase);
         context.getParentContext().register(BeforeUnDeploy.class, new TestCaseUnInstaller());
      }
      catch (final Throwable e)
      {
         throw new RuntimeException("Could not enrich " + testCase + " by installing the instance into MC", e);
View Full Code Here

    {
        Class<PojoNotificationComponent> clazz = PojoNotificationComponent.class;
        componentName = clazz.getSimpleName() + "." + component.getName();
        KernelController controller = getKernel().getController();
        AbstractBeanMetaData beanMetaData = new AbstractBeanMetaData(componentName, clazz.getName());
        controller.install(beanMetaData, this);
    }

    @Override
    protected void clearNotification() throws Throwable
    {
View Full Code Here

                  if (target == null)
                     throw new IllegalArgumentException("Null target.");

                  String beanClassName = target.getClass().getName();
                  AbstractBeanMetaData beanMetaData = new AbstractBeanMetaData(name, beanClassName);
                  KernelControllerContext context = controller.install(beanMetaData, target);
                  objects.add(name);
                  controller.change(context, ControllerState.INSTALLED);
               }
               catch (Throwable t)
               {
View Full Code Here

      builder.ignoreStart(); // We invoke start manually, don't let MC do it
      builder.ignoreStop(); // Stop on the server is called by the client, don't double-stop
      try
      {
         log.debugf("Installing %s into MC under key: %s", this, mcServerBindName);
         controller.install(builder.getBeanMetaData(), this);
      }
      catch (Throwable t)
      {
         throw new Exception("Error in installing " + mcServerBindName + " during startup", t);
      }
View Full Code Here

      Kernel kernel = bootstrap.getKernel();
      KernelController controller = kernel.getController();
      try
      {
         BeanMetaData fsMD = new AbstractBeanMetaData("fileStructure", TmpFileStructure.class.getName());
         KernelControllerContext fsCC = controller.install(fsMD);
         assertEquals(fsCC.getState(), ControllerState.INSTALLED);
         TmpFileStructure fs = (TmpFileStructure)fsCC.getTarget();
         assertNotNull(fs);

         VirtualFile file = getVirtualFile();
View Full Code Here

         VirtualFile file = getVirtualFile();
         assertFalse(fs.checkFileMatchers(file));

         BeanMetaData fmMD = new AbstractBeanMetaData("bshFileMatcher", BshFileMatcher.class.getName());
         controller.install(fmMD);

         assertTrue(fs.checkFileMatchers(file));

         controller.uninstall(fmMD.getName());
View Full Code Here

      builder.ignoreStart(); // We invoke start manually, don't let MC do it
      builder.ignoreStop(); // Stop on the server is called by the client, don't double-stop
      try
      {
         log.debug("Installing " + this + " into MC under key: " + mcServerBindName);
         controller.install(builder.getBeanMetaData(), this);
      }
      catch (Throwable t)
      {
         throw new Exception("Error in installing " + mcServerBindName + " during startup", t);
      }
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.