@Create public void create() { log.debug("Starting JBoss POJO Cache 1.x"); try { cache = new PojoCache(); new org.jboss.cache.PropertyConfigurator().configure(cache, getConfigurationAsStream()); cache.createService(); cache.startService(); } catch (Exception e) { throw new IllegalStateException("Error starting JBoss POJO Cache 1.x", e); } }
@Create public void create() { log.debug("Starting JBoss Treecache 1.x"); try { cache = new TreeCache(); new PropertyConfigurator().configure(cache, getConfigurationAsStream()); cache.createService(); cache.startService(); } catch (Exception e) { throw new IllegalStateException("Error starting JBoss Treecache 1.x", e); } }
try { cache = new org.jboss.cache.TreeCache(); PropertyConfigurator config = new PropertyConfigurator(); config.configure( cache, resource ); TransactionManagerLookup transactionManagerLookup = TransactionManagerLookupFactory.getTransactionManagerLookup(properties); if (transactionManagerLookup!=null) {
/** * Prepare the underlying JBossCache TreeCache instance. * * @param properties All current config settings. * * @throws CacheException Indicates a problem preparing cache for use. */ public void start(Properties properties) { try { cache = new org.jboss.cache.TreeCache(); PropertyConfigurator config = new PropertyConfigurator(); config.configure(cache, "treecache.xml"); TransactionManagerLookup transactionManagerLookup = TransactionManagerLookupFactory.getTransactionManagerLookup(properties); if (transactionManagerLookup!=null) { cache.setTransactionManagerLookup( new TransactionManagerLookupAdaptor(transactionManagerLookup, properties) ); transactionManager = transactionManagerLookup.getTransactionManager(properties); } cache.start(); } catch (Exception e) { throw new CacheException(e); } }
try { cache = new org.jboss.cache.TreeCache(); PropertyConfigurator config = new PropertyConfigurator(); config.configure( cache, resource ); TransactionManagerLookup transactionManagerLookup = TransactionManagerLookupFactory.getTransactionManagerLookup( properties );
public void init() throws SipCacheException { String pojoConfigurationPath = configProperties.getProperty(TREE_CACHE_CONFIG_PATH, DEFAULT_FILE_CONFIG_PATH); if (clusteredSipStack.getStackLogger().isLoggingEnabled(StackLogger.TRACE_INFO)) { clusteredSipStack.getStackLogger().logInfo( "Mobicents JAIN SIP Tree Cache Configuration path is : " + pojoConfigurationPath); } try { treeCache = new TreeCache(); treeCache.createService(); cacheListener = new JBossJainSipCacheListener(clusteredSipStack); treeCache.addTreeCacheListener(cacheListener); PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache. config.configure(treeCache, pojoConfigurationPath); } catch (Exception e) { throw new SipCacheException("Couldn't init the TreeCache", e); } }