Package org.jboss.kernel.spi.dependency

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


      // Register the server implementation
      KernelController controller = kernel.getController();
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JBossServer", getClass().getName());
      builder.addMethodInstallCallback("addBootstrap");
      builder.addMethodUninstallCallback("removeBootstrap");
      controller.install(builder.getBeanMetaData(), this);

      // Determine the url for the bootstrap
      URL configURL = getConfig().getServerConfigURL();
      URL url = getConfig().getBootstrapURL();
      if (url == null)
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);
      }
      catch (final Throwable e)
      {
         throw new RuntimeException("Could not enrich " + testCase + " by installing the instance into MC", e);
      }
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

      MainDeployerImpl main = new MainDeployerImpl();
      main.setStructuralDeployers(createStructuralDeployers());

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JARStructure", ExposedJARStructure.class.getName());
      controller.install(builder.getBeanMetaData());
      builder = BeanMetaDataBuilder.createBuilder("FileStructure", ExposedFileStructure.class.getName());
      controller.install(builder.getBeanMetaData());

      ControllerContext jarContext = controller.getInstalledContext("JARStructure");
      assertNotNull(jarContext);
View Full Code Here

      main.setStructuralDeployers(createStructuralDeployers());

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JARStructure", ExposedJARStructure.class.getName());
      controller.install(builder.getBeanMetaData());
      builder = BeanMetaDataBuilder.createBuilder("FileStructure", ExposedFileStructure.class.getName());
      controller.install(builder.getBeanMetaData());

      ControllerContext jarContext = controller.getInstalledContext("JARStructure");
      assertNotNull(jarContext);
      ExposedJARStructure jarStructure = (ExposedJARStructure)jarContext.getTarget();
      assertNotNull(jarStructure);
View Full Code Here

      assertNotNull(matchers);
      assertEmpty(matchers);

      builder = BeanMetaDataBuilder.createBuilder("RhtDeployer", TestExtensionDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), ".rht");
      controller.install(builder.getBeanMetaData());
      assertEquals(1, matchers.size());

      builder = BeanMetaDataBuilder.createBuilder("JbsDeployer", TestExtensionDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), ".jbs");
      controller.install(builder.getBeanMetaData());
View Full Code Here

      controller.install(builder.getBeanMetaData());
      assertEquals(1, matchers.size());

      builder = BeanMetaDataBuilder.createBuilder("JbsDeployer", TestExtensionDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), ".jbs");
      controller.install(builder.getBeanMetaData());
      assertEquals(2, matchers.size());

      Set<String> suffixes = jarStructure.getSuffixes();
      assertTrue(suffixes.contains(".rhts"));
      assertTrue(suffixes.contains(".jbss"));
View Full Code Here

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("ClassLoading", ClassLoading.class.getName());
      builder.addMethodInstallCallback("addModule");
      builder.addMethodUninstallCallback("removeModule");
      try
      {
         controller.install(builder.getBeanMetaData(), classLoading);
      }
      catch (Throwable t)
      {
         throw new RuntimeException(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

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.