Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 98303 invoked from network); 21 Apr 2010 12:13:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Apr 2010 12:13:52 -0000 Received: (qmail 44626 invoked by uid 500); 21 Apr 2010 12:13:52 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 44569 invoked by uid 500); 21 Apr 2010 12:13:51 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 44559 invoked by uid 99); 21 Apr 2010 12:13:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 12:13:51 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aklimets@day.com designates 207.126.148.85 as permitted sender) Received: from [207.126.148.85] (HELO psmtp.com) (207.126.148.85) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 21 Apr 2010 12:13:44 +0000 Received: from source ([209.85.160.173]) by eu3sys201aob102.postini.com ([207.126.154.11]) with SMTP ID DSNKS87r43dK8x9Nre68vVqkIJmGi9REvGhM@postini.com; Wed, 21 Apr 2010 12:13:23 UTC Received: by gyd5 with SMTP id 5so3427062gyd.18 for ; Wed, 21 Apr 2010 05:13:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.142.18 with HTTP; Wed, 21 Apr 2010 05:13:22 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Apr 2010 13:13:22 +0100 Received: by 10.151.60.7 with SMTP id n7mr6654429ybk.308.1271852002624; Wed, 21 Apr 2010 05:13:22 -0700 (PDT) Message-ID: Subject: Re: onEvent() invocation From: Alexander Klimetschek To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Apr 21, 2010 at 12:04, Ahmed Elshereay wrote: > Thank you very much. I have only one comment about your reply! > I doubt listeners are registered per-session! We use the session to get > the a reference to the Workspace Object, then use that reference to obtai= n > another to ObservationManager to register the listeners, those listeners > are available even in case when logging out the session that was used to > register them! > At the begining I thought the same, but I tested it some how, registered > the listeners, then logged out from created a new session then called > observationManager.getRegisteredEventListeners() and I found the listener= s > which I registered with the previous session although I didn't register > them with the new one. They should be per-session and be automatically released upon session.logout(), if not, this is a bug. http://www.day.com/specs/jcr/1.0/8.3.11_Persistence_of_Event_Listeners.html > WARN =A0[ObservationDispatcher] EventConsumer threw exception: > java.lang.NullPointerException AFAIK, this means your event listener code threw that NPE. Regards, Alex --=20 Alexander Klimetschek alexander.klimetschek@day.com