Top Fields Constructors Methods
net.sf.ehcache.hibernate

public final Class HibernateUtil

extends Object
Class Inheritance
Imports
java.net.URL, java.util.Properties, net.sf.ehcache.config.CacheConfiguration, .Configuration, .ConfigurationFactory, .NonstopConfiguration, .TimeoutBehaviorConfiguration.TimeoutBehaviorType, org.slf4j.Logger, .LoggerFactory

Authors
Chris Dennis, Abhishek Sanoujam

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static Configuration
loadAndCorrectConfiguration(URL url)

Create a cache manager configuration from the supplied url, correcting it for Hibernate compatibility.

pack-priv static Configuration

Returns:

the configuration object passed in, only for convenience
overwriteCacheManagerIfConfigured
(final Configuration
the configuration
configuration
,
final Properties
the properties passed in from Hibernate
properties
)

Will overwrite the CacheManager name from the passed in configuration with the value of net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory#NET_SF_EHCACHE_CACHE_MANAGER_NAME of the passed in Properties

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

HibernateUtilback to summary
private HibernateUtil()

Method Detail

loadAndCorrectConfigurationback to summary
pack-priv static Configuration loadAndCorrectConfiguration(URL url)

Create a cache manager configuration from the supplied url, correcting it for Hibernate compatibility.

Currently correcting for Hibernate compatibility means simply switching any identity based value modes to serialization.

overwriteCacheManagerIfConfiguredback to summary
pack-priv static Configuration overwriteCacheManagerIfConfigured(final Configuration configuration, final Properties properties)

Will overwrite the CacheManager name from the passed in configuration with the value of net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory#NET_SF_EHCACHE_CACHE_MANAGER_NAME of the passed in Properties

Parameters
configuration:Configuration

the configuration

properties:Properties

the properties passed in from Hibernate

Returns:Configuration

the configuration object passed in, only for convenience

setupHibernateTimeoutBehaviorback to summary
private static void setupHibernateTimeoutBehavior(NonstopConfiguration nonstopConfig)