commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pushkar priyadarshi <>
Subject event handler callback not getting called
Date Tue, 18 Mar 2014 11:29:25 GMT
Hi ,

I have used the code from example at for
event handling.

But when an element is evicted from JCS cache im not getting any callback
though i know cache eviction has happened for element for sure.

Is there anything else that i need to do apart from what is mentioned in
the example.

CacheAccess<String, String> jcs = JCS.getInstance( "myregion" );

    . . .

    MyEventHandler meh = new MyEventHandler();

    // this should add the event handler to all items as
    //they are created.
    // jcs.getDefaultElementAttributes returns a copy not a reference
    IElementAttributes attributes = jcs.getDefaultElementAttributes();
    attributes.addElementEventHandler( meh );
    jcs.setDefaultElementAttributes( attributes );

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