EHC ❯ Ehcache CacheManager.getActiveConfigurationText doesn't account for dynamically added caches
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
-
-
cdennis
-
Reporter: gkeim
-
June 21, 2010
-
0
-
Watchers: 1
-
July 27, 2012
-
January 20, 2011
Description
Use the EhcachePounder to dynamically add some caches and then use the DevConsole to generate the cache config XML. Only an entry for the default CacheConfiguration is included. CacheManager.addCacheNoCheck should ensure that there is a CacheConfiguration for the added cache.
Comments
Gary Keim 2010-06-22
Gary Keim 2010-07-02
Chris, I want to add this to CacheManager in taraval-rc:
$ svn diff Index: src/main/java/net/sf/ehcache/CacheManager.java =================================================================== — src/main/java/net/sf/ehcache/CacheManager.java (revision 2545) +++ src/main/java/net/sf/ehcache/CacheManager.java (working copy) @@ -969,6 +969,14 @@ cache.setDiskStorePath(diskStorePath); cache.setTransactionManagerLookup(transactionManagerLookup);
- Map<String, CacheConfiguration> configMap = configuration.getCacheConfigurations();
- if (!configMap.containsKey(cache.getName())) {
- CacheConfiguration cacheConfig = cache.getCacheConfiguration();
- if (cacheConfig != null) {
- configuration.addCache(cacheConfig);
- }
- } + cache.initialise(); if (!allowsDynamicCacheConfig) { cache.disableDynamicFeatures();
Chris Dennis 2010-07-06
That seems good Gary, I have no objections. You want to take this JIRA over and assign to Taraval and check in then? (assuming Fiona and Steve are okay with that).
Gary Keim 2010-07-12
In CacheManager.removeCache we should check that the cache isn’t TerracottaClustered and, if so, de-register the cache configuration. Right?
Fiona OShea 2011-01-13
Is this resolved already? Gary thinks it is. Thanks
Chris Dennis 2011-01-20
Looks to be correct to me in the code. Think this can now go to QA for validation.
In CacheManager.addCacheNoCheck, I added this locally:
Seems to make it work but I don’t know about what to do when removing the cache.