[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-jcs-user
Subject:    CacheElement Event Handler
From:       ankur.kumar () axa ! com ! au
Date:       2004-02-24 3:07:50
Message-ID: OF4B2DFFBD.3B94E1C9-ONCA256E44.0010F6BB-CA256E44.00113298 () nm ! com ! au
[Download RAW message or body]

--=_alternative 00113293CA256E44_=
Content-Type: text/plain; charset="us-ascii"

I'm adding an event handler for a specific cache item like this:
 ElementAttributes attr = 
(ElementAttributes)cache.getElementAttributes().copy();
   if(name.equalsIgnoreCase(EPlatformTask.CONTROL_CACHE_ITEM_NAME))
       attr.addElementEventHandler(new 
com.axa.eplatform.util.ecache.jcache.ControlItemEventHandler());
   attr.setMaxLifeSeconds(ttl);
   cache.put(name, obj, attr);

Here is event handler's code:

package com.axa.eplatform.util.ecache.jcache;

import org.apache.jcs.engine.control.event.behavior.IElementEventHandler;
import org.apache.jcs.engine.control.event.behavior.IElementEvent;
public class ControlItemEventHandler implements IElementEventHandler {

  public java.io.Serializable handleElementEvent(IElementEvent event){
 
System.out.println("\n\n\n\n**********************************************");
    System.out.println(event);
 
System.out.println("**********************************************\n\n\n\n");
    return new String("Test");
  }
}

But this "handleElementEvent" doesnt get invoked.....why????


*********************************************************************************
Important Note
This email (including any attachments) contains information which is 
confidential and may be subject to legal privilege.  If you are not 
the intended recipient you must not use, distribute or copy this 
email.  If you have received this email in error please notify the 
sender immediately and delete this email. Any views expressed in this 
email are not necessarily the views of AXA.   Thank you.
*********************************************************************************


--=_alternative 00113293CA256E44_=--
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic