Package org.jboss.kernel.spi.dependency

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


      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


      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

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

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JARStructure", JARStructure.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", JARStructure.class.getName());
      controller.install(builder.getBeanMetaData());
      builder = BeanMetaDataBuilder.createBuilder("FileStructure", ExposedFileStructure.class.getName());
      controller.install(builder.getBeanMetaData());

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

      Set<FileMatcher> matchers = fileStructure.getMatchers();
      assertNotNull(matchers);
      assertEmpty(matchers);

      builder = BeanMetaDataBuilder.createBuilder("BeanDeployer", TestBeanDeployer.class.getName());
      controller.install(builder.getBeanMetaData());
      assertEquals(1, matchers.size());

      builder = BeanMetaDataBuilder.createBuilder("BshDeployer", TestBshDeployer.class.getName());
      controller.install(builder.getBeanMetaData());
      assertEquals(2, matchers.size());
View Full Code Here

      builder = BeanMetaDataBuilder.createBuilder("BeanDeployer", TestBeanDeployer.class.getName());
      controller.install(builder.getBeanMetaData());
      assertEquals(1, matchers.size());

      builder = BeanMetaDataBuilder.createBuilder("BshDeployer", TestBshDeployer.class.getName());
      controller.install(builder.getBeanMetaData());
      assertEquals(2, matchers.size());

      builder = BeanMetaDataBuilder.createBuilder("ExactNameDeployer", TestNameDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), "some.bsh");
      controller.install(builder.getBeanMetaData());
View Full Code Here

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

      builder = BeanMetaDataBuilder.createBuilder("ExactNameDeployer", TestNameDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), "some.bsh");
      controller.install(builder.getBeanMetaData());
      assertEquals(3, matchers.size());

      Deployers deployers = createDeployers();
      main.setDeployers(deployers);
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

      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

    {
        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);
    }

    protected void clearNotification() throws Throwable
    {
        KernelController controller = getKernel().getController();
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.