Examples of PojoCache


Examples of org.jboss.cache.aop.PojoCache

      super.setUp();
      startCache();
   }

   protected void startCache() throws Exception {
      cache = new PojoCache();
      cache.setCacheMode("local");
      configureCache();
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.createService();
      cache.startService();
View Full Code Here

Examples of org.jboss.cache.aop.PojoCache

             cache=new PojoCache(cluster_name, props, 10000);
             cache.startService();
             cache2=new PojoCache(cluster_name, props, 10000);
             cache2.startService();
             */
         cache = new PojoCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache, configFile); // read in generic replSync xml
         cache.startService();
      } catch (Exception e) {
         e.printStackTrace();
View Full Code Here

Examples of org.jboss.cache.aop.PojoCache

      cache1.stop();
      cache2.stop();
   }

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

Examples of org.jboss.cache.aop.PojoCache

   protected void setUp() throws Exception
   {
      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

Examples of org.jboss.cache.aop.PojoCache

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

      cache1_ = new PojoCache();
      config = new PropertyConfigurator();
      config.configure(cache1_, configFile); // read in generic replSync xml
      cache1_.start();
   }
View Full Code Here

Examples of org.jboss.cache.pojo.PojoCache

     
      registry.releaseCache("alias");
     
      assertEquals(0, registry.getCacheNames().size());
     
      PojoCache pcache = registry.getPojoCache("alias", true);
      assertNotNull(pcache);
      PojoCache otherPC = registry.getPojoCache(DEFAULT_CONFIG, false);
      assertEquals(pcache, otherPC);
     
      assertEquals(1, registry.getPojoCacheNames().size());
     
      registry.releaseCache(DEFAULT_CONFIG);
View Full Code Here

Examples of org.jboss.cache.pojo.PojoCache

      }
     
      // Check if there's an alias involved
      configName = resolveAlias(configName);
     
      PojoCache cache = null;
      synchronized (pojoCaches)
      {
         if (getCacheNames().contains(configName))
            throw new IllegalStateException("Cannot create PojoCache: plain cache already created for config " + configName);
        
View Full Code Here

Examples of org.jboss.cache.pojo.PojoCache

         if (create && pojoCaches.containsKey(configName))
         {
            log.debug("Plain cache requested for config " + configName +
                      " but a PojoCache is already registered; returning " +
                      " the PojoCache's underlying plain cache");
            PojoCache pc = getPojoCache(configName, false);
            if (pc != null)
            {
               return wrapCache(pc.getCache());
            }
         }
        
         return wrapCache(getPlainCache(configName, create));
      }
View Full Code Here

Examples of org.jboss.cache.pojo.PojoCache

      {
         if (pojoCaches.containsKey(configName))
         {
            if (decrementPojoCacheCheckout(configName) == 0)
            {
               PojoCache cache = pojoCaches.remove(configName);
               destroyPojoCache(configName, cache);
            }           
         }
         else
         {
View Full Code Here

Examples of org.jboss.cache.pojo.PojoCache

      for (Map.Entry<String, Boolean> entry : startupCaches.entrySet())
      {
         Cache<Object, Object> cache = null;
         if (entry.getValue().booleanValue())
         {
            PojoCache pc = getPojoCache(entry.getKey(), true);
            cache = pc.getCache();
         }
         else
         {
            cache = getCache(entry.getKey(), true);
         }
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.