public void start() { cache.start(); }
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); } }
public void start() throws SipCacheException { try { cache.start(); } catch (Exception e) { throw new SipCacheException("Couldn't start JBoss Cache", e); } dialogRootNode = cache.getRoot().getChild(SipCache.DIALOG_PARENT_FQN_ELEMENT); if(dialogRootNode == null) { dialogRootNode = cache.getRoot().addChild(Fqn.fromElements(SipCache.DIALOG_PARENT_FQN_ELEMENT)); } if(clusteredSipStack.getReplicationStrategy() == ReplicationStrategy.EarlyDialog) { serverTxRootNode = cache.getRoot().getChild(SipCache.SERVER_TX_PARENT_FQN_ELEMENT); if(serverTxRootNode == null) { serverTxRootNode = cache.getRoot().addChild(Fqn.fromElements(SipCache.SERVER_TX_PARENT_FQN_ELEMENT)); } } }
/** * {@inheritDoc} */ public void start(Settings settings, Properties properties) throws CacheException { use2ndLevel = settings.isSecondLevelCacheEnabled(); useQuery = settings.isQueryCacheEnabled(); if (cache == null) { if (channelFactory == null) { String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE); if (muxStacks != null) { channelFactory = new JChannelFactory(); try { channelFactory.setMultiplexerConfig(muxStacks); } catch (Exception e) { throw new CacheException("Problem setting ChannelFactory config", e); } } } cache = createSharedCache(settings, properties); configureTransactionManager(cache, settings, properties); if (cache.getConfiguration().getMultiplexerStack() != null && cache.getConfiguration().getRuntimeConfig().getMuxChannelFactory() == null) { cache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory); } } cache.start(); }