[infinispan-dev] getting stopped cache
Ales Justin
ales.justin at gmail.com
Sun Aug 26 09:13:10 EDT 2012
Or is this expected behavior? See below on why ...
I actually just saw this now -- I already had an existing CapeDwarf / GAE app deployed / present.
If I remove the app, the problem goes away.
Afaik, AS7 counts how many times EmbeddedCacheManager (ECM) is being used,
better, its AS7 service is depended on,
and if the number is 0, it then (re-)creates the ECM instance.
In my case -- with the app being present - ECM was never re-created when my tests were running.
So Cache::stop shouldn't remove cache from ECM?
Reading ECM::removeCache javadocs:
"but also deletes its contents both in memory and in any backing cache store."
Where I want my data to survive re-starts.
Will this ECM::removeCache also remove data for re-starts?
-Ales
> 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