Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 89939 invoked from network); 30 Nov 2006 17:47:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Nov 2006 17:47:25 -0000 Received: (qmail 18303 invoked by uid 500); 30 Nov 2006 17:47:33 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 18288 invoked by uid 500); 30 Nov 2006 17:47:33 -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 18279 invoked by uid 99); 30 Nov 2006 17:47:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 09:47:33 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jukka.zitting@gmail.com designates 64.233.184.229 as permitted sender) Received: from [64.233.184.229] (HELO wr-out-0506.google.com) (64.233.184.229) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 09:47:21 -0800 Received: by wr-out-0506.google.com with SMTP id i22so875693wra for ; Thu, 30 Nov 2006 09:47:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NKiSIsgeIvmNDqmjZlbRe3z/LSx5X8ILWFVW6w/R//Q8EbMqwLHvOHGwctEHFgly+G0gTfsnQ5geQeKSo3D0zkU9RD2k15/3cNgA+yiOwVDbECLoOfifGfuS9V/lWPwDlOyFJHjOocAXnJHKXvWVyP6xibufhu2CmalVF0N+LzY= Received: by 10.90.55.19 with SMTP id d19mr4002059aga.1164908820455; Thu, 30 Nov 2006 09:47:00 -0800 (PST) Received: by 10.90.27.7 with HTTP; Thu, 30 Nov 2006 09:47:00 -0800 (PST) Message-ID: <510143ac0611300947g92874d8i8254079992cf7d36@mail.gmail.com> Date: Thu, 30 Nov 2006 19:47:00 +0200 From: "Jukka Zitting" To: users@jackrabbit.apache.org Subject: Re: Making an EventListener associated to all sessions of a specific workspace? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org Hi, On 11/30/06, Lei Zhou wrote: > I can of course register EventListeners on a per session basis - by > Workspace.getObservationManager().addEventListener(). But is there a way > to associate listeners to the Repository (or Workspace) itself and set the > "scope" to "all_sessions"? The best solution would be for your application to start a special "listener" session during initialization and use that session for observation. It'll receive notification of all events caused by any normal sessions. This approach will also avoid the issue with event delivery delays, since the listener session can be logged out only when the application itself shuts down. You should use either the superuser account or another special account that has full read access to the workspace to ensure that you receive notification of all changes regardless of possible access controls. BR, Jukka Zitting