Package org.jboss.cache

Examples of org.jboss.cache.PropertyConfigurator


    }

    public void testXmlConfig() throws Exception
    {
        TreeCache cache = new TreeCache();
        PropertyConfigurator pc = new PropertyConfigurator();
        pc.configure(cache, "META-INF/buddyreplication-service.xml");
        cache.createService();

        BuddyManager bm = cache.getBuddyManager();
        assertNotNull(bm);
        assertTrue(bm.isEnabled());
View Full Code Here


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

      log.info("setUp() ....");
      super.setUp();
      Properties prop = new Properties();
      prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
      config.configure(cache_, "META-INF/replSync-service.xml");

      cache1_ = new PojoCache();
      config.configure(cache1_, "META-INF/replSync-service.xml");
      cache_.start();
      cache1_.start();

      tx_mgr = DummyTransactionManager.getInstance();
      t1_ex = t2_ex = null;
View Full Code Here

   {
      if (caches.get(cacheID) != null)
         throw new IllegalStateException(cacheID + " already created");

      PojoCache tree = new PojoCache();
      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.setDeadlockDetection(sync);
      tree.setClusterName("StateTransferTestBase");
      tree.setReplicationVersion(getReplicationVersion());
      // Use a long timeout to facilitate setting debugger breakpoints
      tree.setInitialStateRetrievalTimeout(60000);
View Full Code Here

   }

   private void createCache(IsolationLevel level) throws Exception
   {
      cache = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/local-service.xml");

      cache.setCacheMode(TreeCache.LOCAL);
      cache.setIsolationLevel(level);
      cache.start();
      cache.put("/a/b/c", null);
View Full Code Here

        super.setUp();
        mcl_exception = null;
        m_contextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
        System.setProperty(Context.INITIAL_CONTEXT_FACTORY, CONTEXT_FACTORY);
        DummyTransactionManager.getInstance();
        PropertyConfigurator config = new PropertyConfigurator();
        // setup and start the source cache
        m_srcCache = new TreeCache();
        config.configure(m_srcCache, "META-INF/replSync-service.xml");
        m_srcCache.setTransactionManagerLookupClass(
                "org.jboss.cache.DummyTransactionManagerLookup");
        m_srcCache.setCacheMode(TreeCache.REPL_SYNC);

        m_srcCache.setSyncCommitPhase(true);
        m_srcCache.createService();
        m_srcCache.startService();
        // setup and start the destination cache
        m_dstCache = new TreeCache();
        config.configure(m_dstCache, "META-INF/replSync-service.xml");
        m_dstCache.setTransactionManagerLookupClass(
                "org.jboss.cache.DummyTransactionManagerLookup");
        m_dstCache.setCacheMode(TreeCache.REPL_SYNC);

        m_dstCache.setSyncCommitPhase(true);
View Full Code Here

   {
      super.setUp();
      Properties prop = new Properties();
      prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
      config.configure(cache_, "META-INF/replSync-service.xml");

      cache1_ = new PojoCache();
      config.configure(cache1_, "META-INF/replSync-service.xml");
      cache_.start();
      cache1_.start();
   }
View Full Code Here

   {
      super.setUp();
      Properties prop = new Properties();
      prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
      config.configure(cache_, "META-INF/replSync-service.xml");

      cache1_ = new PojoCache();
      config.configure(cache1_, "META-INF/replSync-service.xml");
      cache_.start();
      cache1_.start();
   }
View Full Code Here

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

   {
      super.setUp();
      log.info("setUp() ....");
      String configFile = "META-INF/cache-config.xml";
      cache_ = new PojoCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache_, configFile); // read in generic replSync xml
      cache_.start();

   }
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.