[infinispan-dev] getting stopped cache

Ales Justin ales.justin at gmail.com
Mon Aug 27 16:51:21 EDT 2012


OK, let me try this workaround.

But should Cache::stop also remove it or not?

If yes, I might dig deeper into finding the culprit,
if not, then the workaround should do, I guess.

-Ales

> 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]




More information about the infinispan-dev mailing list