Package org.jboss.cache

Examples of org.jboss.cache.PropertyConfigurator.configure()


   void initCaches() throws Exception
   {
//      sleep(10000);
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, "META-INF/pojocache-service.xml"); // read in generic local xml
      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache_.startService();
   }

   public void tearDown() throws Exception
View Full Code Here


  
   private TreeCache createCache(String clusterName) throws Exception
   {
      TreeCache cache = new TreeCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(cache, "META-INF/replSync-service.xml");
      cache.setUseRegionBasedMarshalling(false);
      cache.setCacheMode(TreeCache.REPL_SYNC);
      cache.setUseInterceptorMbeans(true);
      cache.setClusterName(clusterName);
      cache.createService();
View Full Code Here

   void initCaches() throws Exception
   {
      cache_ = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, "META-INF/local-passivation-service.xml"); // read in generic local xml
      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache_.setCacheLoaderConfiguration(getSingleCacheLoaderConfig(true, "/", DummyInMemoryCacheLoader.class.getName(), null, false, true, false, false));
      cache_.startService();
   }
View Full Code Here

   }

   private PojoCache createCache(String name) throws Exception {
      PojoCache tree=new PojoCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, "META-INF/replSync-service.xml"); // read in generic replAsync xml
      tree.setClusterName(name);
      tree.createService();
      tree.startService();
      return tree;
   }
View Full Code Here

   void initCaches() throws Exception
   {
      removeStaleFiles();
      cache_ = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, "META-INF/local-eviction-cacheloader-service.xml"); // read in generic local xml
      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache_.startService();
   }

   public void tearDown() throws Exception
View Full Code Here

   }

   void initCaches(TreeCache cache) throws Exception
   {
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/local-passivation-service.xml"); // read in generic local xml
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
   }

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

   private void initCaches() throws Exception
   {
      cache = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/local-mru-eviction-service.xml"); // read in generic local xml
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.setIsolationLevel(IsolationLevel.SERIALIZABLE);
      cache.startService();
   }
View Full Code Here

   void initCaches(int caching_mode) throws Exception
   {
      cachingMode_ = caching_mode;
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, "META-INF/local-service.xml"); // read in generic local xml
      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache_.startService();
   }

   void destroyCaches() throws Exception
View Full Code Here

   protected void setUp() throws Exception
   {
      super.setUp();
      tree=new TreeCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, "META-INF/replAsync-service.xml"); // read in generic replAsync xml
      tree.setClusterName("Test");
      // Use marshaller
      tree.setUseRegionBasedMarshalling(true);
      tree.setInactiveOnStartup(true);
      tree.createService();
View Full Code Here

   private PojoCache createCache(String name) throws Exception {
      PojoCache tree = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();   // configure the cache through injection
       // read in the replSync xml. Here we use synchronous mode replication.
      config.configure(tree, "META-INF/replSync-service.xml");
//      config.configure(tree, "META-INF/local-service.xml");
      tree.setClusterName(name); // We can set a different cluster group.
      tree.start(); // kick start the cache
      return tree;
   }
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.