Package org.jboss.cache

Examples of org.jboss.cache.CacheSPI.start()


   {
      CacheSPI cache = createCacheUnstarted(true);
      cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig());

      cache.create();
      cache.start();
      return cache;
   }

   public void testPassivationLocal() throws Exception
   {
View Full Code Here


   protected void configureCache() throws Exception
   {
      CacheSPI delegating_cache = (CacheSPI) new UnitTestCacheFactory<Object, Object>().createCache(false, getClass());
      delegating_cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
      delegating_cache.create();
      delegating_cache.start();
      delegating_cacheTL.set(delegating_cache);

      LocalDelegatingCacheLoaderConfig cfg = new LocalDelegatingCacheLoaderConfig();
      cfg.setDelegate(delegating_cache);
      cfg.setAsync(false);
View Full Code Here

      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
//      cr.unregisterComponent(ChannelMessageListener.class);
      cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);
//      cr.updateDependencies();

      cache.start();


      c= UnitTestConfigurationFactory.createConfiguration(CacheMode.REPL_ASYNC);
      //c.setClusterName("VersionedTestBase");
      c.setReplVersionString(getReplicationVersion());
View Full Code Here

      cr = TestingUtil.extractComponentRegistry(recipient);
      cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);

      try
      {
         recipient.start();
         fail("start() should throw an exception");
      }
      catch (CacheException good)
      {
         // this is what we want
View Full Code Here

      config.setShared(false);
      config.setPassivation(passivation);
      cache.getConfiguration().setCacheLoaderConfig(config);
      if (start)
      {
         cache.start();
      }

      return cache;
   }
View Full Code Here

      }
      else
      {
         c.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.NotifyingTransactionManager");
      }
      c.start();
      return c;
   }

   // we need a 'special' stack that does not attempt redelivery since we kill a channel midway during a tx in this test.
   private String getJGroupsStack() throws Exception          
View Full Code Here

      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
//      cr.unregisterComponent(ChannelMessageListener.class);
      cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);
//      cr.updateDependencies();

      cache.start();


      c= UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_ASYNC);
      //c.setClusterName("VersionedTestBase");
      c.setReplVersionString(getReplicationVersion());
View Full Code Here

      cr = TestingUtil.extractComponentRegistry(recipient);
      cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);

      try
      {
         recipient.start();
         fail("start() should throw an exception");
      }
      catch (CacheException good)
      {
         // this is what we want
View Full Code Here

      CacheSPI cache2 = null;
      try
      {
         cache2 = createCache("cache2", false, false, true, false, false, true);
         cache2.create();
         cache2.start();

         //Vladimir  October 5th 2007
         //failure of integration of persistent state is not considered to be fatal
         //to revisit with Manik
         //fail("Should have caused an exception");
View Full Code Here

      c2.put(B, "K", "V");

      assert c1.getConfiguration().isFetchInMemoryState();
      assert c1.getConfiguration().getCacheLoaderConfig().isFetchPersistentState();
      c1.start();

      assert c1.get(B, "K").equals("V");
      assert c1.get(A, "K") == null;
      assert !l1.exists(A);
   }
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.