Package org.hibernate.cache

Examples of org.hibernate.cache.CacheException


          ctx = new InitialContext(jndiProperties);
          return (EmbeddedCacheManager) ctx.lookup(jndiNamespace);
      } catch (NamingException ne) {
          String msg = "Unable to retrieve CacheManager from JNDI [" + jndiNamespace + "]";
          log.info(msg, ne);
          throw new CacheException( msg );
      } finally {
          if (ctx != null) {
              try {
                  ctx.close();
              } catch( NamingException ne ) {
View Full Code Here


      try {
          if (transactionManager != null) {
              tx = transactionManager.getTransaction();
          }
      } catch (SystemException se) {
          throw new CacheException("Could not obtain transaction", se);
      }
      return tx == null ? Thread.currentThread() : tx;
   }
View Full Code Here

       try {
           if (transactionManager != null) {
               tx = transactionManager.suspend();
           }
       } catch (SystemException se) {
           throw new CacheException("Could not suspend transaction", se);
       }
       return tx;
   }
View Full Code Here

   public void resume(Transaction tx) {
       try {
           if (tx != null)
               transactionManager.resume(tx);
       } catch (Exception e) {
           throw new CacheException("Could not resume transaction", e);
       }
   }
View Full Code Here

      String msg = "Could not instantiate cache provider: "
        + providerClassName
        + "\nUnsupported cache provider implemention is not included our Product."
        + "\nThis error may be caused by the configured cache provider was not found in the classpath."
        + "\nPlease check the cache configuration and make sure the provider is in the classpath.";
      throw new CacheException( msg, cnfe );
    }
  }
View Full Code Here

    try {
      if (transactionManager != null) {
        tx = transactionManager.getTransaction();
      }
    } catch (SystemException se) {
      throw new CacheException("Could not obtain transaction", se);
    }
    return tx == null ? Thread.currentThread() : tx;

  }
View Full Code Here

    }

    public void remove(Object key) throws CacheException {
      
      if (!putValidator.invalidateKey(key)) {
        throw new CacheException("Failed to invalidate pending putFromLoad calls for key " + key + " from region " + region.getName());
      }       
      
        // We remove whether or not the region is valid. Other nodes
        // may have already restored the region so they need to
        // be informed of the change.
View Full Code Here

        CacheHelper.remove(cache, regionFqn, key);
    }

    public void removeAll() throws CacheException {
       if (!putValidator.invalidateRegion()) {
         throw new CacheException("Failed to invalidate pending putFromLoad calls for region " + region.getName());
       }
       CacheHelper.removeAll(cache, regionFqn);
    }
View Full Code Here

    }

    public void evict(Object key) throws CacheException {
      
      if (!putValidator.invalidateKey(key)) {
        throw new CacheException("Failed to invalidate pending putFromLoad calls for key " + key + " from region " + region.getName());
      }       
      
        region.ensureRegionRootExists();
       
        CacheHelper.remove(cache, regionFqn, key);
View Full Code Here

        CacheHelper.remove(cache, regionFqn, key);
    }

    public void evictAll() throws CacheException {
       if (!putValidator.invalidateRegion()) {
         throw new CacheException("Failed to invalidate pending putFromLoad calls for region " + region.getName());
       }
       
       Transaction tx = region.suspend();
       try {       
          region.ensureRegionRootExists();
View Full Code Here

TOP

Related Classes of org.hibernate.cache.CacheException

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.