[jbosscache-issues] [JBoss JIRA] Created: (JBCACHE-1399) programatic eviction configuration

Mircea Markus (JIRA) jira-events at lists.jboss.org
Mon Aug 18 08:11:58 EDT 2008


programatic eviction configuration
----------------------------------

                 Key: JBCACHE-1399
                 URL: https://jira.jboss.org/jira/browse/JBCACHE-1399
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 2.2.0.CR7
            Reporter: Mircea Markus
            Assignee: Manik Surtani
             Fix For: 2.2.0.GA, 3.0.0.GA


if the user specifies an eviction config for a certain region, it is discarded (no warn being logged either) if the config file does not have eviction activated, i.e. it does not specify the eviction configuration statically.
On a second thought, this might be avoided if the user programmaticaly registers  default eviction config, at least.
This is unnecessary complexity for the user, though. 
On an .xml config file not having specified an eviction attribute, following code should work (also eviction should be enabled):
      Region region = admDataCache.getRegion(fqn, true);
      ExpirationConfiguration expirationConfiguration = new ExpirationConfiguration();
      expirationConfiguration.setTimeToLiveSeconds(2);
      region.setEvictionPolicy(expirationConfiguration);

Another issue (not necessarily related to this one, but on the same forum and easy to fix :) ) is that expirationConfiguration.setTimeToLiveSeconds(2); does not work.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosscache-issues mailing list