Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24498105FD for ; Tue, 18 Mar 2014 11:30:16 +0000 (UTC) Received: (qmail 88663 invoked by uid 500); 18 Mar 2014 11:30:12 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 87757 invoked by uid 500); 18 Mar 2014 11:29:55 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 87732 invoked by uid 99); 18 Mar 2014 11:29:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 11:29:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of priyadarshi.pushkar@gmail.com designates 209.85.223.177 as permitted sender) Received: from [209.85.223.177] (HELO mail-ie0-f177.google.com) (209.85.223.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 11:29:46 +0000 Received: by mail-ie0-f177.google.com with SMTP id rl12so6925890iec.36 for ; Tue, 18 Mar 2014 04:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=deULbsrO+Y1uPG6a9zyptXqghJxHJPRLK2x9XMoI5vc=; b=n34d3vrPcP/tM09i9IGfTzALE+e9XlMIOmXHWikVqbOQlig4iz7R3bLQXPloib/WEb MKQsaB0icM2WNzKk1mMPqQnGjHTK3nQppPk1oEBtpRaRrMnqesNrKG2fgAoEgY5vqRgm 2JU6EMrrl8sN3D3it99j1hvWWgKoj43SlcdlZzisq7QeS/qs0b5xlTY+40AeTkzNNhEd JUtQfnK4ovOJDmmQVXa1vpeSbcamYU2JHesXnJI3RHGwLLZriqhxa7/tC6MYfGCJnS4g bcgL8/GP6z6h/MrJBYVD/naBUCjJexP2yiFobDFXhH4vnvGqtBsFg5/F7AyVbYnY4PnC la7w== MIME-Version: 1.0 X-Received: by 10.42.15.142 with SMTP id l14mr1071742ica.64.1395142165563; Tue, 18 Mar 2014 04:29:25 -0700 (PDT) Received: by 10.50.49.40 with HTTP; Tue, 18 Mar 2014 04:29:25 -0700 (PDT) Date: Tue, 18 Mar 2014 16:59:25 +0530 Message-ID: Subject: event handler callback not getting called From: pushkar priyadarshi To: user@commons.apache.org Content-Type: multipart/alternative; boundary=20cf304352aa30919c04f4dfd9fc X-Virus-Checked: Checked by ClamAV on apache.org --20cf304352aa30919c04f4dfd9fc Content-Type: text/plain; charset=ISO-8859-1 Hi , I have used the code from example at http://commons.apache.org/proper/commons-jcs/ElementEventHandling.html 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 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 ); --20cf304352aa30919c04f4dfd9fc--