Package org.jboss.cache

Examples of org.jboss.cache.PropertyConfigurator


   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


      cache2_.stop();
   }

   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

   }

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

   }

   void initCaches() throws Exception
   {
      cache = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/local-elementsize-eviction-service.xml"); // read in generic local xml
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.setIsolationLevel(IsolationLevel.SERIALIZABLE);
      cache.startService();
   }
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.setCacheMode(TreeCache.REPL_SYNC);
      cache.setCacheLoaderConfiguration(getCacheLoaderConfig("location="+getTempDir()));
      cache.setUseInterceptorMbeans(true);
      cache.setClusterName(clusterName);
      if (optimistic)
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.JBossTransactionManagerLookup");
      cache_.startService();
   }
View Full Code Here

   }

   private void setupCache(String configurationName) throws Exception
   {
      cache = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, configurationName);
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.setIsolationLevel(IsolationLevel.SERIALIZABLE);
      cache.startService();
      regionManager = cache.getEvictionRegionManager();
   }
View Full Code Here

      if (useConsole) {
        demo = new TreeCacheView2(null);
        demo.start();
      } else {
        tree = new TreeCache();
        PropertyConfigurator config = new PropertyConfigurator();
        config.configure(tree, resource);

        tree.addTreeCacheListener(new TreeCacheView.MyListener());
        tree.start();
        demo = new TreeCacheView2(tree);
        demo.start();
View Full Code Here

      if (cache == null)
      { // still not set
         if (config != null)
         {
            cache = new TreeCache();
            PropertyConfigurator cfg = new PropertyConfigurator();
            cfg.configure(cache, config);
            cache.createService();
            cache.startService();
         }
      }
View Full Code Here

        }

        if (cache == null)
        {
            cache = new TreeCache();
            PropertyConfigurator config = new PropertyConfigurator();
            config.configure(cache, configFile);
            cache.startService(); // kick start tree cache
        }

        remoteObj = new RemoteTreeCacheImpl(cache);
        Naming.rebind("//" + bindAddress + ":" + port + "/" + bindName, remoteObj);
View Full Code Here

TOP

Related Classes of org.jboss.cache.PropertyConfigurator

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.