/** * Builds a Cache. * <p> * Even though this method provides properties, they are not used. * Properties for EHCache are specified in the ehcache.xml file. * Configuration will be read from ehcache.xml for a cache declaration * where the name attribute matches the name parameter in this builder. * * @param name the name of the cache. Must match a cache configured in ehcache.xml * @param properties not used * @return a newly built cache will be built and initialised * @throws org.hibernate.cache.CacheException * inter alia, if a cache of the same name already exists */ public final Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = manager.getEhcache(name); if (cache == null) { LOG.warn("Could not find a specific ehcache configuration for cache named [" + name + "]; using defaults."); manager.addCache(name); cache = manager.getEhcache(name); LOG.debug("started EHCache region: " + name); } return new EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
@Override public Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = cacheManager.getEhcache(name); if (cache == null) { LOG.warn("Could not find a specific ehcache configuration for cache named [" + name + "]; using defaults."); cacheManager.addCache(name); cache = cacheManager.getEhcache(name); EhCacheProvider.LOG.debug("started EHCache region: " + name); } return new net.sf.ehcache.hibernate.EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
@Override public Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = cacheManager.getEhcache(name); if (cache == null) { LOG.warn("Could not find a specific ehcache configuration for cache named [" + name + "]; using defaults."); cacheManager.addCache(name); cache = cacheManager.getEhcache(name); EhCacheProvider.LOG.debug("started EHCache region: " + name); } return new net.sf.ehcache.hibernate.EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
/** * Builds a Cache. * <p> * Even though this method provides properties, they are not used. * Properties for EHCache are specified in the ehcache.xml file. * Configuration will be read from ehcache.xml for a cache declaration * where the name attribute matches the name parameter in this builder. * * @param name the name of the cache. Must match a cache configured in ehcache.xml * @param properties not used * @return a newly built cache will be built and initialised * @throws org.hibernate.cache.CacheException * inter alia, if a cache of the same name already exists */ public final Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = manager.getEhcache(name); if (cache == null) { LOG.warn("Could not find a specific ehcache configuration for cache named [" + name + "]; using defaults."); manager.addCache(name); cache = manager.getEhcache(name); LOG.debug("started EHCache region: " + name); } return new EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
/** * Builds a Cache. * <p/> * Even though this method provides properties, they are not used. * Properties for EHCache are specified in the ehcache.xml file. * Configuration will be read from ehcache.xml for a cache declaration * where the name attribute matches the name parameter in this builder. * * @param name the name of the cache. Must match a cache configured in ehcache.xml * @param properties not used * @return a newly built cache will be built and initialised * @throws org.hibernate.cache.CacheException * inter alia, if a cache of the same name already exists */ public final Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = manager.getEhcache(name); if (cache == null) { LOG.warn("Could not find a specific ehcache configuration for cache named [" + name + "]; using defaults."); manager.addCache(name); cache = manager.getEhcache(name); LOG.debug("started EHCache region: " + name); } return new EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
/** * Builds a Cache. * <p/> * Even though this method provides properties, they are not used. * Properties for EHCache are specified in the ehcache.xml file. * Configuration will be read from ehcache.xml for a cache declaration * where the name attribute matches the name parameter in this builder. * * @param name the name of the cache. Must match a cache configured in ehcache.xml * @param properties not used * @return a newly built cache will be built and initialised * @throws org.hibernate.cache.CacheException * inter alia, if a cache of the same name already exists */ public final Cache buildCache(String name, Properties properties) throws CacheException { try { net.sf.ehcache.Ehcache cache = manager.getEhcache(name); if (cache == null) { LOG.warn("Could not find a specific ehcache configuration for cache named [" + name + "]; using defaults."); manager.addCache(name); cache = manager.getEhcache(name); LOG.debug("started EHCache region: " + name); } HibernateUtil.validateEhcache(cache); return new EhCache(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }