In RegionManager the wrong region is selected for a fqn because of the use of an HashMap to store the configurated region elements from definition
Since I need this correction now, I submited a bug on jira and I proposed a patch http://jira.jboss.com/jira/browse/JBCACHE-373 Patch: --- RegionManager.java.orig 2005-12-15 13:21:32.014766898 +0100 +++ RegionManager.java 2005-12-15 14:14:12.752630015 +0100 @@ -11,7 +11,7 @@ import org.apache.commons.logging.LogFactory; import org.jboss.cache.TreeCache; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** @@ -28,7 +28,7 @@ private Log log_=LogFactory.getLog(RegionManager.class); // TODO We should externalize this. public final static int CAPACITY = 200000; - private Map regionMap_ = new HashMap(); + private Map regionMap_ = new LinkedHashMap(); // optimization private Region[] regions_; private EvictionPolicy policy_; @@ -95,8 +95,8 @@ String myRFqn = appendFqn(myFqn); // TODO need further optimization in regex matching - // Do it in reverse order such that children fqn gets matched first. - for (int i = (regions.length - 1); i >= 0; i--) + // Do it in direct order such that children fqn gets matched first. + for (int i = 0; i<regions.length ; i++) { String fqn = regions.getFqn(); if (myRFqn.startsWith(fqn)) return regions; I hope this help. Carlo Rossi View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912871#3912871 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912871 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
