-
Bug
-
Resolution: Done
-
Major
-
5.1.7.Final, 5.2.0.Final
Copied from ISPN-2297:
If a cache is stopped via Cache.stop() it will still be returned by DefaultCacheManager.getCache(). Cache start() and stop() are not synchronized in any way, so a start() call may return before the cache was properly started - just because another thread is in the process of starting it.
Also, the documentation of EmbeddedCacheManager.getCache() should say that it will start the cache only if it doesn't exist yet - if the cache is stopped it will return the cache as it was. Alternatively we could change the behaviour of getCache() to always start the cache.