Hibernate ORM CacheException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM CacheException class.

This code example shows how to use the following methods:
                    new ReadWriteAccessDelegate<HazelcastCollectionRegion>(this, props));
        } 
        if (AccessType.TRANSACTIONAL.equals(accessType)) {
            throw new CacheException("Transactional access is not currently supported by Hazelcast.");
        } 
        throw new CacheException("Got unknown AccessType " + accessType
                                 + " while attempting to build CollectionRegionAccessStrategy."); 
    } 
} 
Full Snippet Info
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
                    new ReadWriteAccessDelegate<HazelcastEntityRegion>(this, props));
        } 
        if (AccessType.TRANSACTIONAL.equals(accessType)) {
            throw new CacheException("Transactional access is not currently supported by Hazelcast.");
        } 
        throw new CacheException("Got unknown AccessType \"" + accessType
                                 + "\" while attempting to build EntityRegionAccessStrategy."); 
    } 
 
} 
Full Snippet Info
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        if (AccessType.READ_WRITE.equals(accessType)) {
            return new NaturalIdRegionAccessStrategyAdapter( 
                    new ReadWriteAccessDelegate<HazelcastNaturalIdRegion>(this, props));
        } 
        if (AccessType.TRANSACTIONAL.equals(accessType)) {
            throw new CacheException("Transactional access is not currently supported by Hazelcast.");
        } 
        throw new CacheException("Got unknown AccessType \"" + accessType
                                 + "\" while attempting to build EntityRegionAccessStrategy."); 
    } 
} 
Full Snippet Info
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
                config = ConfigLoader.load(configResourcePath);
            } catch (IOException e) {
                LOGGER.warning("IOException: " + e.getMessage());
            } 
            if (config == null) {
                throw new CacheException("Could not find configuration file: " + configResourcePath);
            } 
        } 
        if (instanceName != null) {
            instance = Hazelcast.getHazelcastInstanceByName(instanceName);
            if (instance == null) {
                try { 
                    createOrGetInstance(); 
                } catch (DuplicateInstanceNameException ignored) {
                    instance = Hazelcast.getHazelcastInstanceByName(instanceName);
                } 
            } 
        } else { 
            createOrGetInstance(); 
        } 
Full Snippet Info
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
      if (AccessType.READ_ONLY.equals(accessType)) {
         return new ReadOnlyAccess(this);
      } else if (AccessType.TRANSACTIONAL.equals(accessType)) {
         return new TransactionalAccess(this);
      } 
      throw new CacheException("Unsupported access type [" + accessType.getExternalName() + "]");
   } 
 
   public PutFromLoadValidator getPutFromLoadValidator() { 
      return new PutFromLoadValidator(transactionManager); 
   } 
} 
Full Snippet Info
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
          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 ) {
                  log.info("Unable to release initial context", ne);
              } 
          } 
      } 
   } 
 
   @Override 
   public void stop() { 
      // Do not attempt to stop a cache manager because it wasn't created by this region factory. 
Full Snippet Info
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
      if (AccessType.READ_ONLY.equals(accessType)) {
         return new ReadOnlyAccess(this);
      } else if (AccessType.TRANSACTIONAL.equals(accessType)) {
         return new TransactionalAccess(this);
      } 
      throw new CacheException("Unsupported access type [" + accessType.getExternalName() + "]");
   } 
 
   public PutFromLoadValidator getPutFromLoadValidator() { 
      return new PutFromLoadValidator(transactionManager); 
   } 
} 
Full Snippet Info
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
      cacheAdapter.remove(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 { 
         CacheHelper.sendEvictAllNotification(cacheAdapter, region.getAddress()); 
      } finally { 
         region.resume(tx); 
      } 
   } 
} 
Full Snippet Info
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    String sessionId = session.getId();
    if ( sessionId != null ) {
      String newKey = sessionId + "\t" + key; //$NON-NLS-1$
      return newKey;
    } else { 
      throw new CacheException( Messages.getInstance().getErrorString( "CacheManager.ERROR_0001_NOSESSION" ) ); //$NON-NLS-1$
    } 
  } 
 
  private LastModifiedCache buildCache( String key, Properties cacheProperties ) {
    if ( getCacheProvider() != null ) { 
      Cache cache = getCacheProvider().buildCache( key, cacheProperties );
      LastModifiedCache lmCache = new LastModifiedCache( cache );
      if ( cacheExpirationRegistry != null ) {
        cacheExpirationRegistry.register( lmCache );
      } else { 
        logger.warn( Messages.getInstance().getErrorString( "CacheManager.WARN_0003_NO_CACHE_EXPIRATION_REGISTRY" ) );
      } 
      return lmCache;
    } else { 
Full Snippet Info
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		try { 
			Element element = new Element( key, value ); 
			cache.put( element ); 
		} 
		catch ( IllegalArgumentException e ) { 
			throw new CacheException( e ); 
		} 
		catch ( IllegalStateException e ) { 
			throw new CacheException( e ); 
		} 
		catch ( net.sf.ehcache.CacheException e ) { 
			if ( e instanceof NonStopCacheException ) { 
				HibernateNonstopCacheExceptionHandler.getInstance() 
						.handleNonstopCacheException( (NonStopCacheException) e ); 
			} 
			else { 
				throw new CacheException( e ); 
			} 
		} 
	} 
Full Snippet Info
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java