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_[i].name_, algo);
| region.setMaxNodes(regionValues_[i].maxNodes_ );
|
region.setTimeToLiveSeconds(regionValues_[i].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_[i].name_, algo);
| region.setMaxNodes(regionValues_[i].maxNodes_ );
|
region.setTimeToLiveSeconds(regionValues_[i].timeToLiveSeconds_);
region.setMaxAgeSeconds(regionValues_[i].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