Package org.jboss.cache

Examples of org.jboss.cache.PropertyConfigurator


   @Create
   public void start() throws Exception
   {
      log.debug("starting JBoss Cache");
      cache = new org.jboss.cache.aop.PojoCache();
      new PropertyConfigurator().configure(cache, cfgResourceName);
      cache.createService();
      cache.startService();
   }
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

   {
      if (caches.get(cacheID) != null)
      throw new IllegalStateException(cacheID + " already created");
     
      TreeCacheMBean tree=new TreeCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, configFile);
     
      tree.createService();
      tree.startService();
     
      caches.put(cacheID, tree);
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");
      tree.setClusterName(name); // We can set a different cluster group.
      tree.start(); // kick start the cache
      return tree;
   }
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");
      tree.setClusterName(name); // We can set a different cluster group.
      tree.start(); // kick start the cache
      return tree;
   }
View Full Code Here

   }

   TreeCache createCache(IsolationLevel level) throws Exception
   {
      TreeCache cache = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/replAsync-service.xml");
      cache.setIsolationLevel(level);
      System.out.println("cache isolation level is " + cache.getIsolationLevel());
      return cache;
   }
View Full Code Here

   private void startCache() throws Exception
   {
      if (cache_ == null)
      {
         cache_ = new TreeCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache_, configFile_);
        
         cache_.create();
         cache_.start();
        
         log.info("Cache started");
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("VersionedTestBase");
      tree.setReplicationVersion(getReplicationVersion());
      // Use a long timeout to facilitate setting debugger breakpoints
      tree.setInitialStateRetrievalTimeout(60000);
      if (useMarshalling) {
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");
      tree.setClusterName(name); // We can set a different cluster group.
      tree.start(); // kick start the cache
      return tree;
   }
View Full Code Here

{
  
   public void testFailedStateTransfer() throws Exception
   {
      TreeCacheMBean tree =new SecretiveStateCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, "META-INF/replAsync-service.xml");
      tree.setClusterName("VersionedTestBase");
      tree.setReplicationVersion(getReplicationVersion());
      // Use a long timeout to facilitate setting debugger breakpoints
      tree.setInitialStateRetrievalTimeout(60000);
     
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.