Examples of registerComponent()


Examples of org.infinispan.factories.GlobalComponentRegistry.registerComponent()

    * @return the original component that was replaced
    */
   public static <T> T replaceComponent(CacheContainer cacheContainer, Class<T> componentType, T replacementComponent, boolean rewire) {
      GlobalComponentRegistry cr = extractGlobalComponentRegistry(cacheContainer);
      T old = cr.getComponent(componentType);
      cr.registerComponent(replacementComponent, componentType);
      if (rewire) {
         cr.rewire();
         cr.rewireNamedRegistries();
      }
      return old;
View Full Code Here

Examples of org.infinispan.factories.GlobalComponentRegistry.registerComponent()

    * @return the original component that was replaced
    */
   public static <T> T replaceComponent(CacheContainer cacheContainer, Class<T> componentType, T replacementComponent, boolean rewire) {
      GlobalComponentRegistry cr = extractGlobalComponentRegistry(cacheContainer);
      T old = cr.getComponent(componentType);
      cr.registerComponent(replacementComponent, componentType);
      if (rewire) {
         cr.rewire();
         cr.rewireNamedRegistries();
      }
      return old;
View Full Code Here

Examples of org.jboss.as.ejb3.subsystem.deployment.AbstractEJBComponentRuntimeHandler.registerComponent()

    private void installManagementResource(ComponentConfiguration configuration, DeploymentUnit deploymentUnit) {
        final EJBComponentType type = EJBComponentType.getComponentType(configuration);
        PathAddress addr = getComponentAddress(type, configuration, deploymentUnit);
        final AbstractEJBComponentRuntimeHandler handler = type.getRuntimeHandler();
        handler.registerComponent(addr, configuration.getComponentDescription().getStartServiceName());
        deploymentUnit.addToAttachmentList(EjbDeploymentAttachmentKeys.MANAGED_COMPONENTS, new InstalledComponent(type, addr));
        deploymentUnit.createDeploymentSubModel(EJB3Extension.SUBSYSTEM_NAME, addr.getLastElement());
    }

    private void uninstallManagementResource(final InstalledComponent component) {
View Full Code Here

Examples of org.jboss.as.ejb3.subsystem.deployment.AbstractEJBComponentRuntimeHandler.registerComponent()

    private void installManagementResource(ComponentConfiguration configuration, DeploymentUnit deploymentUnit) {
        final EJBComponentType type = EJBComponentType.getComponentType(configuration);
        PathAddress addr = getComponentAddress(type, configuration, deploymentUnit);
        final AbstractEJBComponentRuntimeHandler handler = type.getRuntimeHandler();
        handler.registerComponent(addr, configuration.getComponentDescription().getStartServiceName());
        deploymentUnit.addToAttachmentList(EjbDeploymentAttachmentKeys.MANAGED_COMPONENTS, new InstalledComponent(type, addr));
        deploymentUnit.createDeploymentSubModel(EJB3Extension.SUBSYSTEM_NAME, addr.getLastElement());
    }

    private void uninstallManagementResource(final InstalledComponent component) {
View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.registerComponent()

      cache = createCacheWithListener(listener);

      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);

      CommandInterceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
      cr.registerComponent(interceptor, OptimisticCreateIfNotExistsInterceptor.class);
      CommandInterceptor nodeInterceptor = new OptimisticNodeInterceptor();
      cr.registerComponent(nodeInterceptor, OptimisticNodeInterceptor.class);
      dummy = new MockInterceptor();
      cr.registerComponent(dummy, MockInterceptor.class);
View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.registerComponent()

      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);

      CommandInterceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
      cr.registerComponent(interceptor, OptimisticCreateIfNotExistsInterceptor.class);
      CommandInterceptor nodeInterceptor = new OptimisticNodeInterceptor();
      cr.registerComponent(nodeInterceptor, OptimisticNodeInterceptor.class);
      dummy = new MockInterceptor();
      cr.registerComponent(dummy, MockInterceptor.class);

      interceptor.setNext(nodeInterceptor);
      nodeInterceptor.setNext(dummy);
View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.registerComponent()

      CommandInterceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
      cr.registerComponent(interceptor, OptimisticCreateIfNotExistsInterceptor.class);
      CommandInterceptor nodeInterceptor = new OptimisticNodeInterceptor();
      cr.registerComponent(nodeInterceptor, OptimisticNodeInterceptor.class);
      dummy = new MockInterceptor();
      cr.registerComponent(dummy, MockInterceptor.class);

      interceptor.setNext(nodeInterceptor);
      nodeInterceptor.setNext(dummy);

      TestingUtil.replaceInterceptorChain(cache, interceptor);
View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.registerComponent()

      caches.put("secretive", cache);

      // inject our own message listener and re-wire deps
      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
//      cr.unregisterComponent(ChannelMessageListener.class);
      cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);
//      cr.updateDependencies();

      cache.start();

View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.registerComponent()

      // start it can still be destroyed later
      caches.put("secretive2", recipient);

      // inject our own message listener and re-wire deps
      cr = TestingUtil.extractComponentRegistry(recipient);
      cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);

      try
      {
         recipient.start();
         fail("start() should throw an exception");
View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.registerComponent()

      cache = createCacheWithListener(listener);

      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);

      CommandInterceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
      cr.registerComponent(interceptor, OptimisticCreateIfNotExistsInterceptor.class);
      CommandInterceptor nodeInterceptor = new OptimisticNodeInterceptor();
      cr.registerComponent(nodeInterceptor, OptimisticNodeInterceptor.class);
      dummy = new MockInterceptor();
      cr.registerComponent(dummy, MockInterceptor.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.