@Override public void afterPropertiesSet() throws Exception { final CacheFactory<String, Ticket> cf = new DefaultCacheFactory<>(); this.cache = cf.createCache(this.configLocation.getInputStream()); }
protected void constructCache() throws ConfigurationException { log.debug("Constructing Cache"); CacheFactory<K, V> cf = new DefaultCacheFactory<K, V>(); setCache(cf.createCache(config, false)); }
/** * Create a cache using the given settings and properties. * * @param settings The Hibernate settings * @param properties The configuration properties * @return The created cache */ protected Cache createSharedCache(Settings settings, Properties properties) { String configResource = PropertiesHelper.getString(CACHE_RESOURCE_PROP, properties, DEFAULT_CACHE_RESOURCE); return DefaultCacheFactory.getInstance().createCache(configResource, false); }
public void start() { CacheFactory<String, Object> factory = new DefaultCacheFactory<>(); String configFileName = CONFIG_PATH; _cache = factory.createCache(configFileName, false); _cache.create(); _cache.start(); } }
@Create public void create() { log.debug("Starting JBoss Cache"); try { CacheFactory factory = new DefaultCacheFactory(); cache = factory.createCache(getConfigurationAsStream()); cache.create(); cache.start(); } catch (Exception e) { //log.error(e, e); throw new IllegalStateException("Error starting JBoss Cache", e); } }
cache = cacheFactory.createCache(stream); setupMaxSizeEviction(facesContext, cache); } catch (IOException e) { cache = cacheFactory.createCache(configuration);