[infinispan-dev] getting stopped cache

Galder Zamarreño galder at redhat.com
Mon Aug 27 07:08:49 EDT 2012


As a workaround, couldn't you check what the status of the cache is before using it? If it's stopped, you could call cache.start() again.

On Aug 25, 2012, at 3:44 PM, Ales Justin wrote:

> When running CapeDwarf tests these days I get this broken behavior:
> (using: Ispan 5.2.0.Alpha2)
> 
> On 1st test all works OK:
> * getting the X cache
> * passing it to SearchManager (from Ispan Query)
> * doing queries, etc
> * stopping the X cache on app (aka Arquillian test) undeploy
> 
> But when running 2nd app (more Arquillian tests) it breaks.
> 
> I'm again using X cache, via this lookup:
> (where toCacheName == X)
> 
>            final Cache<K, V> cache = cacheManager.getCache(toCacheName(config, appId), false);
>            if (cache != null)
>                return cache;
> 
> And I actually get some cache, where I would expect none.
> 
> Since this cache is not new, it's never run against Ispan Query's LifecycleManager,
> hence there is no QueryInterceptor in its component registry.
> 
> Which is where the app breaks: SearchManager requires QueryInterceptor in cache' component registry.
> 
> Shouldn't Cache::stop also remove the cache from EmbeddedCacheManager?
> btw: this used to work, dunno when it broke ...
> 
> Anyone else seeing something similar?
> 
> -Ales
> 
> ----------
> 
> 15:32:06,810 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http-/192.168.1.101:8080-3) Exception sending request initialized lifecycle event to listener instance of class org.jboss.capedwarf.appidentity.GAEListener: java.lang.IllegalArgumentException: Indexing was not enabled on this cache. class org.infinispan.query.backend.QueryInterceptor not found in registry
> 	at org.infinispan.query.impl.ComponentRegistryUtils.getComponent(ComponentRegistryUtils.java:40)
> 	at org.infinispan.query.SearchManagerImpl.<init>(SearchManagerImpl.java:57)
> 	at org.infinispan.query.Search.getSearchManager(Search.java:39)
> 	at org.jboss.capedwarf.datastore.AbstractDatastoreService.<init>(AbstractDatastoreService.java:61) [capedwarf-datastore-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
> 	at org.jboss.capedwarf.datastore.JBossDatastoreService.<init>(JBossDatastoreService.java:56) [capedwarf-datastore-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
> 	at com.google.appengine.api.datastore.DatastoreServiceFactory.getDatastoreService(DatastoreServiceFactory.java) [appengine-api-1.0-sdk-1.7.0.jar:]
> 	at org.jboss.capedwarf.log.JBossLogService.requestStarted(JBossLogService.java:215) [capedwarf-log-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list