3 Replies Latest reply on Mar 12, 2008 3:36 PM by Manik Surtani

    Requirement for _default_ eviction region

    Brian Stansberry Master

      Follow-on to our discussion on http://jira.jboss.org/jira/browse/JBCACHE-1288

      Looking at RegionManager for other reasons and noticed this bit in getRegion(Fqn, Region.Type, boolean):

       // test if the default region has been defined. If not, and if eviction regions
       // are in use, throw an exception since it is required.
       if ((nextBestThing == null || nextBestThing.getFqn().isRoot() && !regionsRegistry.containsKey(Fqn.ROOT))
       && type == EVICTION)
       if (log.isTraceEnabled())
       log.trace("Next best region is " + nextBestThing + ". RegionsRegistry contains a default? " + regionsRegistry.containsKey(Fqn.ROOT) + " Region type requested = " + type);
       throw new RuntimeException("No default eviction region defined!");

      Looks like we *are* enforcing a requirement for a _default_ region.