Package org.jboss.ha.framework.server

Examples of org.jboss.ha.framework.server.PojoCacheManager


      return config.getCacheName();
   }
  
   public static PojoCache findPojoCache(String cacheConfigName) throws ClusteringNotSupportedException
   {
      PojoCacheManager pcm = getManagerForPojoCache(cacheConfigName);
     
      try
      {
         return pcm.getPojoCache(cacheConfigName, true);
      }
      catch (RuntimeException re)
      {
         throw re;
      }
View Full Code Here


   }
  
   private static PojoCacheManager getManagerForPojoCache(String cacheConfigName)
      throws ClusteringNotSupportedException
   {
      PojoCacheManager pcm = null;
      try
      {
         pcm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
      }
      catch (Throwable t)
      {
         throw new ClusteringNotSupportedException("Could not access PojoCacheManager for JBossWeb clustering", t);
      }
     
      if (!pcm.getConfigurationNames().contains(cacheConfigName))
         throw new IllegalStateException("PojoCacheManager does not recognize config " + cacheConfigName);
     
      return pcm;
   }
View Full Code Here

   @Override
   protected void releaseCacheToManager(String cacheConfigName)
   {     
      try
      {
         PojoCacheManager pcm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
         pcm.releaseCache(cacheConfigName);
      }
      catch (Exception e)
      {
         log_.error("Problem releasing cache to CacheManager -- config is " + cacheConfigName, e);
      }
View Full Code Here

      return config.getCacheName();
   }
  
   public static PojoCache findPojoCache(String cacheConfigName) throws ClusteringNotSupportedException
   {
      PojoCacheManager pcm = getManagerForPojoCache(cacheConfigName);
     
      try
      {
         return pcm.getPojoCache(cacheConfigName, true);
      }
      catch (RuntimeException re)
      {
         throw re;
      }
View Full Code Here

   }
  
   private static PojoCacheManager getManagerForPojoCache(String cacheConfigName)
      throws ClusteringNotSupportedException
   {
      PojoCacheManager pcm = null;
      try
      {
         pcm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
      }
      catch (Throwable t)
      {
         throw new ClusteringNotSupportedException("Could not access PojoCacheManager for JBossWeb clustering", t);
      }
     
      if (!pcm.getConfigurationNames().contains(cacheConfigName))
         throw new IllegalStateException("PojoCacheManager does not recognize config " + cacheConfigName);
     
      return pcm;
   }
View Full Code Here

   @Override
   protected void releaseCacheToManager(String cacheConfigName)
   {     
      try
      {
         PojoCacheManager pcm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
         pcm.releaseCache(cacheConfigName);
      }
      catch (Exception e)
      {
         log_.error("Problem releasing cache to CacheManager -- config is " + cacheConfigName, e);
      }
View Full Code Here

   {
      try
      {
         if (usePojoCache)
         {
            PojoCacheManager cm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
            return cm.getPojoCache(cacheConfig, true).getCache();
         }
         else
         {
            CacheManager cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
            return cm.getCache(cacheConfig, true);
         }
      }
      catch (RuntimeException re)
      {
         throw re;
View Full Code Here

   {
      if (cache != null && cacheConfigName != null)
      {
         if (usePojoCache)
         {
            PojoCacheManager cm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
            cm.releaseCache(cacheConfigName);
         }
         else
         {
            CacheManager cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
            cm.releaseCache(cacheConfigName);
         }
        
         cache = null;
      }     
   }
View Full Code Here

*/
public class Util
{
   public static PojoCache findPojoCache(String cacheConfigName) throws ClusteringNotSupportedException
   {
      PojoCacheManager pcm = getManagerForPojoCache(cacheConfigName);
     
      try
      {
         return pcm.getPojoCache(cacheConfigName, true);
      }
      catch (RuntimeException re)
      {
         throw re;
      }
View Full Code Here

   }
  
   private static PojoCacheManager getManagerForPojoCache(String cacheConfigName)
      throws ClusteringNotSupportedException
   {
      PojoCacheManager pcm = null;
      try
      {
         pcm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
      }
      catch (Throwable t)
      {
         throw new ClusteringNotSupportedException("Could not access PojoCacheManager for JBossWeb clustering", t);
      }
     
      if (!pcm.getConfigurationNames().contains(cacheConfigName))
         throw new IllegalStateException("PojoCacheManager does not recognize config " + cacheConfigName);
     
      return pcm;
   }
View Full Code Here

TOP

Related Classes of org.jboss.ha.framework.server.PojoCacheManager

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.