Handling of default eviction region config leads to duplicates
--------------------------------------------------------------
Key: JBCACHE-1288
URL:
http://jira.jboss.com/jira/browse/JBCACHE-1288
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Eviction
Affects Versions: 2.1.0.CR3
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: 2.1.0.CR4
The way the EvictionConfig.getEvictionRegionConfigs() method works leads to duplicate
entries for the _default_ region when the JBoss Microcontainer builds up a
configuration.
Problem is when there is no list of ERCs, the method builds one with a config for the
_default_ region in it, and returns that. The MC will call this method, and then try to
add xml-configured ERCs to the returned list. If a _default_ region is configured in XML,
the _default_ region will end up being in the resulting list twice.
Test org.jboss.cache.config.EvictionRegionConfigurationTest.testDuplicateDefaultRegion()
shows the issue.
I think the core problem here is that the attempt to add a default region is being done in
the wrong place. It's not really the concern of the EvictionConfig class. I think it
properly belongs in RegionManager.setEvictionConfig() -- that's the class that's
responsible for checking the configuration and making it conform to its requirements.
I've got a patch along the above lines.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira