@Override public void init() { if (LOG.isDebugEnabled()) { LOG.debug("init: reuse current cache?" + (cache!=null? "yes" : "no") + ", cache name=" + this.cacheName); } if(this.cache == null) // only create the treecache once (stop + start will use the same treecache) { CacheContainer container = this.registry.getCacheContainer(this.containerName); Cache<String, Binding> underlyingCache = (this.cacheName == null) ? container.<String, Binding>getCache() : container.<String, Binding>getCache(this.cacheName); if (!underlyingCache.getStatus().allowInvocations()) { underlyingCache.start(); } this.cache = this.treeCacheFactory.createTreeCache(underlyingCache); } else if (!cache.getCache().getStatus().allowInvocations()) { cache.getCache().start(); } }