Hello Manik.

Only one little detail. We have been making more testing and we have detected a 
possible bug. 

The parameter MaxAgeSeconds from LRUPolicy is not assigned to the Region in the 
method 

   public void configure(TreeCache cache).

The code from JBossCache_1_2_4 branch, LRUPolicy.java is the following:


  | public void configure(TreeCache cache) {
  |    cache_ = cache;
  |    // Step x. Get the config elem
  |    Element elem = cache.getEvictionPolicyConfig();
  |    parseConfig(elem);
  |    // Step x. Create LRUAlgorithm and regions
  |    // Step x. Create regions
  |    regionManager_ = new RegionManager(this);
  |    for(int i=0; i< regionValues_.length; i++) {
  |       EvictionAlgorithm algo = getEvictionAlgorithm();
  |       try {
  |          Region region = 
regionManager_.createRegion(regionValues_&#91;i&#93;.name_, algo);
  |          region.setMaxNodes(regionValues_&#91;i&#93;.maxNodes_ );
  |          
region.setTimeToLiveSeconds(regionValues_&#91;i&#93;.timeToLiveSeconds_);       
  
  |       } catch (RegionNameConflictException e) {
  |          throw new RuntimeException(
  |                "LRUPolicy.cacheStarted(): illegal region name specified for 
eviction policy "
  |             + " exception: " +e);
  |       }
  |    }
  | }
  | 

and we suppose it should be 


  | public void configure(TreeCache cache) {
  |    cache_ = cache;
  |    // Step x. Get the config elem
  |    Element elem = cache.getEvictionPolicyConfig();
  |    parseConfig(elem);
  |    // Step x. Create LRUAlgorithm and regions
  |    // Step x. Create regions
  |    regionManager_ = new RegionManager(this);
  |    for(int i=0; i< regionValues_.length; i++) {
  |       EvictionAlgorithm algo = getEvictionAlgorithm();
  |       try {
  |          Region region = 
regionManager_.createRegion(regionValues_&#91;i&#93;.name_, algo);
  |          region.setMaxNodes(regionValues_&#91;i&#93;.maxNodes_ );
  |          
region.setTimeToLiveSeconds(regionValues_&#91;i&#93;.timeToLiveSeconds_);       
           region.setMaxAgeSeconds(regionValues_&#91;i&#93;.maxAgeSeconds_);    
  } catch (RegionNameConflictException e) {
  |          throw new RuntimeException(
  |                "LRUPolicy.cacheStarted(): illegal region name specified for 
eviction policy "
  |             + " exception: " +e);
  |       }
  |    }
  | }
  | 

We have been making tests with this change in the code and it works correctly.

Best regards.

Jose Angel Chico

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3902035#3902035

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3902035


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to