Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 52968 invoked from network); 2 Mar 2011 08:16:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Mar 2011 08:16:02 -0000 Received: (qmail 83340 invoked by uid 500); 2 Mar 2011 08:16:02 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 82934 invoked by uid 500); 2 Mar 2011 08:15:57 -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 82926 invoked by uid 99); 2 Mar 2011 08:15:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2011 08:15:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fmeschbe@gmail.com designates 209.85.218.42 as permitted sender) Received: from [209.85.218.42] (HELO mail-yi0-f42.google.com) (209.85.218.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2011 08:15:46 +0000 Received: by yic21 with SMTP id 21so3535490yic.1 for ; Wed, 02 Mar 2011 00:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=TfFAxM9XULVsefNf/e+VqXp3cKULxLi5k2wJBVajHmY=; b=bUmuh84oL695gOnkSjyau/4PkHVCy8IVsV9jmyNzz1Yl9GOkFA4OnxMgpPmMEw7aEd zpgtlOzEi4FfjP7OcA1+Ym3XmbdAYAEtirMg5u1lSTxOYmOzmOj0Hsl21UhTI2LThrN0 BtHqhnMnEPpcHjHy8cQRipaHWJbIjYw3RgQVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=s+94fwmL8qsXsrMPtjTzK77O+b1jYAwk49mrVLvQQxQSxBtVX5J2GKuON1+wOTZQX3 Eies19PgSJH9N1cWHkiK20h5CwrjW2wvON0XSMNA8eHMb8pY5MKv1P3WbULMF1nCB/58 Tq8StYexoUE8R8fNSXVxCE9ElTsXbeB+Vun5E= Received: by 10.90.214.10 with SMTP id m10mr10722103agg.8.1299053725241; Wed, 02 Mar 2011 00:15:25 -0800 (PST) Received: from [192.168.1.21] (cable-static-182-112.eblcom.ch [87.102.182.112]) by mx.google.com with ESMTPS id w6sm3271558anf.26.2011.03.02.00.15.19 (version=SSLv3 cipher=OTHER); Wed, 02 Mar 2011 00:15:21 -0800 (PST) Subject: Re: Persistent Observation Listeners From: Felix Meschberger To: users@jackrabbit.apache.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 02 Mar 2011 09:15:17 +0100 Message-ID: <1299053717.6973.120.camel@meschbix> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, IIRC it is prescribed by the JCR spec that observation listener registration is bounded by the Session life cycle. One of the reasons for this is that observation events are filtered by access control. So, yes, we keep the sessions open for as long as we have an observation listener registered. An Session will generally not have a big memory footprint -- if it has such used memory can be collected over time. The biggest problem would probably be if the Session would keep uncommitted changes longer than required.... Regards Felix Am Dienstag, den 01.03.2011, 20:18 -0500 schrieb Daniel Sbityakov: > Hello all. I'm having a conceptual problem with observation event mechanism. > > It appears that any event listener A opened by session B will be > disconnected from the observation facility when B is closed. This is > somewhat odd, because you add event listeners to a workspace-bound > observation manager, not to a session. However, jackrabbit > implementation uses the observation mechanism extensively, but using > internal "system" sessions, which, I'm guessing, are never closed. > > What is the best practice that you all can recommend when you need > long-running listeners without the overhead of keeping sessions > opened? Or do we follow jackrabbit example and squirrel some sessions > away and keep them open to keep the observation events communication > flowing? > Please advise. > > Thank you!