jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mosttler, Marcus" <mmostt...@HarryandDavid.com>
Subject ElementEventHandler
Date Mon, 09 Jan 2006 23:15:12 GMT
We recently converted our system to use JCS.  It is working out quite
well and was fairly easy to setup.  I would like to thank all who have
worked on this.

We have run into a problem though.  We are trying to do some additional
clean up work when an element in the cache expires.  When it is
attempted to be retrieved it is removed due to it being expired.  I
found in the element event constants a list of events, one of which fits
perfectly for our situation, 

31      /***
32       * Expiration discovered on request
33       */
34      public final static int ELEMENT_EVENT_EXCEEDED_MAXLIFE_ONREQUEST
= 1;

41      /***
42       * Expiration discovered on request
43       */
44      public final static int

Since this appeared to meet our needs I have created a handler to
implement the interface and have added it to the element.  My hope was
that when the element expired and was removed on the get that an event
would trigger calling my handler.

This does not seem to be the case.  The handler is never called.  So I
have studied the code some and have only found the event handler to be
used along with some disk spooling events.

Is this something that has not been completed or is my understanding of
the event handler and the events listed in the constants incorrect?

Thank you for your time.

Marcus Mosttler

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