I randomly saw cache got terminated for unknow reasons. Is anyone experiencing this? Or what is the root cause?
I am on ISPN 5.1.3 final using H2DB cache store in embeded fashion. When my code tried to access the cache, it throws following exceptions:
Cache 'keychain' is in 'TERMINATED' state and so it does not accept new invocations. Either restart it or recreate the cache container.
If it is kind expected, what's the suggested ways to monitor this? thanks.
Thanks Pisa. I'll look into this.
A related question about start/stop cahces: Do I need to call start() on cache manager first to call startCache(s) for named caches? Or do I need to call startCache(s) after call start() on cacheManager? Right now, it seems that calling start() on cacheManager is not required if startCache() method is called.
Galder, thanks for the response.
I am trying to use start() on cacheManager right now.
It seems that the method startCaches( String ...) may have potential issues when you have many named caches configured. The issue ("Unable to aquire lock..) I ran into may be related to this method. I used the startCaches( ..) in my earlier code.
Right now, what I am doing is that I create a DefaultCacheManager, and call start() on the cacheManager. I do not call startCache() or startCaches() on named caches, since all defined caches in the same cache manager have the same life cycle.
I am testing these changes now.
Do you see any problems?
No, I do not have a unit test to recreat "Unable to acquire lock" yet. I'll try to create one. Right now, I ran into many other issues (as posted separately), and try to work around of them. I am thinking the startCaches(list of cache names) method behaves differently. The code seems putting starting each cache in a separate thread. thanks.