Hi, On 5/30/07, Luca Tagliani <[EMAIL PROTECTED]> wrote:
Ok, I answered to myself... I can just pass the session to the constructor of my EventListener and use it during event processing.
One thing you should keep in mind is that you need to use a different session than the one you registered the event listener with. The events are delivered in a separate thread, which could cause the original session to be accessed from multiple concurrent threads. In fact the safest event processing model would be to have the event listener placing the events (or copies of them, since at least the Jackrabbit EventImpl class keeps and uses a references both to the originating and listening sessions) in a synchronized event queue from where the events are picked up and processed by a separate processing thread. BR, Jukka Zitting
