Package org.jboss.cache.factories

Examples of org.jboss.cache.factories.ComponentRegistry$Component


{
   protected ComponentRegistry cr = null;

   protected VersionAwareMarshaller createVAMandRestartCache(String replVersion)
   {
      ComponentRegistry cr = this.cr;
      Configuration c = cr.getComponent(Configuration.class);
      c.setReplVersionString(replVersion);
      return createVAMandRestartCache(new RegionManagerImpl());
   }
View Full Code Here


      return createVAMandRestartCache(new RegionManagerImpl());
   }

   protected VersionAwareMarshaller createVAMandRestartCache(RegionManager rm)
   {
      ComponentRegistry cr = this.cr;
      if (cr.getState() == CacheStatus.STARTED) cr.stop();
      cr.registerComponent(rm, RegionManager.class);
      cr.create();
      cr.rewire();
      // force cache mode
      VersionAwareMarshaller m = (VersionAwareMarshaller) cr.getComponent(Marshaller.class);
      m.init();
      m.initReplicationVersions();
      return m;
   }
View Full Code Here

public class VersionAwareMarshallerTest extends AbstractVersionAwareMarshallerTest
{
   @BeforeMethod
   public void setUp()
   {
      this.cr = new ComponentRegistry(new Configuration(), new CacheInvocationDelegate());
   }
View Full Code Here

   }

   @AfterMethod
   public void postTest()
   {
      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);

      LockAssert.assertNoLocks(cr.getComponent(LockManager.class), cr.getComponent(InvocationContextContainer.class));
   }
View Full Code Here

   }

   @AfterMethod
   public void postTest()
   {
      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);

      LockAssert.assertNoLocks(cr.getComponent(LockManager.class), cr.getComponent(InvocationContextContainer.class));
   }
View Full Code Here

    * Bootstraps this factory with a Configuration and a ComponentRegistry.
    */
   private void bootstrap(CacheSPI spi, Configuration configuration)
   {
      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(configuration, spi);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      this.configuration = configuration;

      componentRegistry.registerComponent(spi, CacheSPI.class);
      componentRegistry.registerComponent(new PlatformMBeanServerRegistration(), PlatformMBeanServerRegistration.class);
View Full Code Here

    * Bootstraps this factory with a Configuration and a ComponentRegistry.
    */
   private void bootstrap(CacheSPI spi, Configuration configuration)
   {
      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(configuration, spi);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      this.configuration = configuration;

      componentRegistry.registerComponent(spi, CacheSPI.class);
   }
View Full Code Here

    * Bootstraps this factory with a Configuration and a ComponentRegistry.
    */
   private void bootstrap(CacheSPI spi, Configuration configuration)
   {
      // injection bootstrap stuff
      componentRegistry = new ComponentRegistry(configuration, spi);
      componentRegistry.registerDefaultClassLoader(defaultClassLoader);
      this.configuration = configuration;

      componentRegistry.registerComponent(spi, CacheSPI.class);
      componentRegistry.registerComponent(new PlatformMBeanServerRegistration(), PlatformMBeanServerRegistration.class);
View Full Code Here

      // first create a stream to unmarshall.
//      RegionManager rm = new RegionManager();
      final CacheMarshaller200 cm200 = new CacheMarshaller200();
      c.setInactiveOnStartup(false);
      c.setUseRegionBasedMarshalling(true);
      ComponentRegistry cr = new ComponentRegistry(c);
      cr.registerComponent(cm200, CacheMarshaller200.class);
      cr.start();

      RegionManager rm = cr.getComponent(RegionManager.class);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      final Fqn region = Fqn.fromString("/hello");
      Region r = rm.getRegion(region, true);
      r.registerContextClassLoader(this.getClass().getClassLoader());
View Full Code Here

    * Constructs an uninitialized CacheImpl.
    */
   protected CacheImpl(Configuration configuration)
   {
      this.configuration = configuration;
      this.componentRegistry = new ComponentRegistry(configuration);
      this.cacheStatus = CacheStatus.INSTANTIATED;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.factories.ComponentRegistry$Component

Copyright © 2018 www.massapicom. 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.