Package org.jboss.cache.passivation

Source Code of org.jboss.cache.passivation.PassivationToLocalDelegatingCacheLoaderTest

package org.jboss.cache.passivation;

import junit.framework.Test;
import junit.framework.TestSuite;
import org.jboss.cache.TreeCache;
import org.jboss.cache.loader.DelegatingCacheLoader;
import org.jboss.cache.loader.LocalDelegatingCacheLoader;

/**
* Runs a test against using delegated cache loader
*
* @author <a href="mailto:{hmesha@novell.com}">{Hany Mesha}</a>
* @version $Id: PassivationToLocalDelegatingCacheLoaderTest.java 992 2006-01-10 23:41:19Z msurtani $
*/
public class PassivationToLocalDelegatingCacheLoaderTest extends PassivationTestsBase {
   TreeCache delegating_cache;
   DelegatingCacheLoader cache_loader;


   protected void configureCache() throws Exception {
      delegating_cache=new TreeCache();
      delegating_cache.setCacheMode(TreeCache.LOCAL);
      delegating_cache.createService();
      delegating_cache.startService();
      cache_loader=new LocalDelegatingCacheLoader(delegating_cache);
       // configure first ...
       cache.setCacheLoaderConfiguration(getCacheLoaderConfig("", "org.jboss.cache.loader.LocalDelegatingCacheLoader", "", false, false));

       cache.setCacheLoader(cache_loader);
   }

   protected void tearDown() throws Exception {
      super.tearDown();
      delegating_cache.stopService();
      delegating_cache.destroyService();
   }


   public static Test suite() {
      return new TestSuite(PassivationToLocalDelegatingCacheLoaderTest.class);
   }


   public static void main(String[] args) {
      junit.textui.TestRunner.run(suite());
   }

}
TOP

Related Classes of org.jboss.cache.passivation.PassivationToLocalDelegatingCacheLoaderTest

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.