You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2006/11/30 18:47:00 UTC

Re: Making an EventListener associated to all sessions of a specific workspace?

Hi,

On 11/30/06, Lei Zhou <Le...@pointalliance.com> 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