Package org.jboss.cache

Examples of org.jboss.cache.PropertyConfigurator


      cache2=createCache("CacheGroup");
   }

   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);
     
      // Call the hook that allows mux integration
      configureMultiplexer(tree);
     
View Full Code Here


   {
      super.setUp();
      log_.info("setUp() ....");
      String configFile = "META-INF/local-service.xml";
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, configFile); // read in generic replSync xml
      cache_.start();
   }
View Full Code Here

   PojoCache initCaches() throws Exception
   {
      PojoCache cache_;
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, "META-INF/replSync-service.xml"); // read in generic replSync xml
      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
//      cache_.setCacheMode(cachingMode_);
      cache_.startService();
      return cache_;
//        org.jgroups.log.Trace.init();
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/replSync-service.xml"); // read in generic replSync xml
      cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache_.startService();
//        org.jgroups.log.Trace.init();
   }
View Full Code Here

   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

   {
      if (caches.get(cacheID) != null)
         throw new IllegalStateException(cacheID + " already created");
     
      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

    * @throws Exception
    */
   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);
     
      cache1.startService();
     
      cache1.put("/a/b/c", "key", "value");
View Full Code Here

    * @throws Exception
    */
   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);   
     
      cache1.startService();
     
      // Put in a bunch of data, both in the default region
View Full Code Here

   PojoCache cache_;

   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();
   }
View Full Code Here

      TestingUtil.blockUntilViewsReceived(new TreeCache[] { cache1, cache2 }, 60000);
   }

   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

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.