Package org.jboss.cache

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


   public void testConfigure()
   {
      try {
         TreeCache cache = new TreeCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache, "META-INF/local-service.xml");
         log("Cluster properties: " + cache.getClusterProperties());
         assertEquals("CacheMode", "LOCAL", cache.getCacheMode());
      } catch (Exception ex) {
         ex.printStackTrace();
         fail(ex.toString());
View Full Code Here


     
      TreeCacheMBean tree=new TreeCache();
      PropertyConfigurator config=new PropertyConfigurator();
      String configFile = sync ? "META-INF/replSync-service.xml"
                               : "META-INF/replAsync-service.xml";
      config.configure(tree, configFile); // read in generic replAsync xml
      tree.setClusterName("Test");
      if (useMarshalling) {
         tree.setUseRegionBasedMarshalling(true);
         tree.setInactiveOnStartup(true);
      }
View Full Code Here

    */
   public void testEvictionSeesStateTransfer() throws Exception
   {
      TreeCache cache1 = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache1, "META-INF/replSync-eviction-service.xml");     
      caches.put("cache1", cache1);
     
      TreeCache cache2 = new TreeCache();
      config.configure(cache2, "META-INF/replSync-eviction-service.xml");    
      caches.put("cache2", cache2);
View Full Code Here

      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache1, "META-INF/replSync-eviction-service.xml");     
      caches.put("cache1", cache1);
     
      TreeCache cache2 = new TreeCache();
      config.configure(cache2, "META-INF/replSync-eviction-service.xml");    
      caches.put("cache2", cache2);
     
      cache1.startService();
     
      cache1.put("/a/b/c", "key", "value");
View Full Code Here

    */
   public void testEvictionAfterStateTransfer() throws Exception
   {
      TreeCache cache1 = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache1, "META-INF/replSync-eviction-service.xml");      
      caches.put("cache1", cache1);   
     
      final TreeCache cache2 = new TreeCache();
      config.configure(cache2, "META-INF/replSync-eviction-service.xml");    
      caches.put("cache2", cache2);   
View Full Code Here

      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache1, "META-INF/replSync-eviction-service.xml");      
      caches.put("cache1", cache1);   
     
      final TreeCache cache2 = new TreeCache();
      config.configure(cache2, "META-INF/replSync-eviction-service.xml");    
      caches.put("cache2", cache2);   
     
      cache1.startService();
     
      // Put in a bunch of data, both in the default region
View Full Code Here

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

   void destroyCache() throws Exception
View Full Code Here

   }

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

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

   PojoCache createCache() throws Exception
   {
      PojoCache cache = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/replSync-service.xml"); // use generic syncRepl xml
      cache.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
      cache.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
      return cache;
   }
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.