org.hibernate.cache.ehcache.internal.nonstop
Class HibernateNonstopCacheExceptionHandler

java.lang.Object
  extended by org.hibernate.cache.ehcache.internal.nonstop.HibernateNonstopCacheExceptionHandler

public final class HibernateNonstopCacheExceptionHandler
extends Object

Class that takes care of NonStopCacheException that happens in hibernate module


Field Summary
static String HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY
          Property name for logging the stack trace of the nonstop cache exception too.
static String HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY
          Property name which set as "true" will throw exceptions on timeout with hibernate
 
Method Summary
static HibernateNonstopCacheExceptionHandler getInstance()
          Returns the singleton instance
 void handleNonstopCacheException(net.sf.ehcache.constructs.nonstop.NonStopCacheException nonStopCacheException)
          Handle NonStopCacheException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY

public static final String HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY
Property name which set as "true" will throw exceptions on timeout with hibernate

See Also:
Constant Field Values

HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY

public static final String HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY
Property name for logging the stack trace of the nonstop cache exception too. False by default

See Also:
Constant Field Values
Method Detail

getInstance

public static HibernateNonstopCacheExceptionHandler getInstance()
Returns the singleton instance

Returns:
the singleton instance

handleNonstopCacheException

public void handleNonstopCacheException(net.sf.ehcache.constructs.nonstop.NonStopCacheException nonStopCacheException)
Handle NonStopCacheException. If HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY system property is set to true, rethrows the NonStopCacheException, otherwise logs the exception. While logging, if HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY is set to true, logs the exception stack trace too, otherwise logs the exception message only

Parameters:
nonStopCacheException -


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.