jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Datta Mane <datta.ma...@gmail.com>
Subject Event handling related Question. Memory Shringker thread
Date Wed, 11 Jan 2012 07:34:29 GMT
This is  scenario I am stuck with

EPG (Electronic programming guide): has data  which is frequently updated

MY WEB APP:  On load calls the EPG Services and load data into JCS cache
After few minutes Say 15 minutes I have to make a call to EPG Service and
get the new Data

Based on this documentation

My understanding is  when Memory Shrinker Property is set to true and Idle
Time is exceeded
Shrinked thread will remove the Cached Object from memory and invoke
 Eventhandlers handleElementEvent(IElementEvent iElementEvent)

And it does invoke the handleElementEvent(IElementEvent iElementEvent)
So  I put the code below  in handleElementEvent  to load Data
                    event = (ElementEvent) iElementEvent;
                    element = (CacheElement) event.getSource();
                loadDataFromEPG("TVGUIDE"); // reload data into Cache


The issue is Shrinker Thread Calls  handleElementEvent  only for the first
time when the cached exceed Idle time
After reloading When the newly Cached Object exceeds the
ideltime handleElementEvent
is not invoked.

Is this a BUG ?  or Am I doing any thing wrong
How can I resolve this JCS API.

Other option I have  is to use  Quartz Job  to refresh data in Local JCS
cache at specified interval which I want to avoid.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message