jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sriraj paul <srirajp...@yahoo.co.uk>
Subject Re: JCR event listenser unexpected behaviour when using wedav
Date Tue, 19 Oct 2010 09:01:51 GMT
>You'll need to keep the session open for as long as you're interested in 
>receiving observation events.

I think i am telling the opposite thing. I am not interested in recieving events 

due to operations by the current session. That is why i set the nolocal 
parameter of addEventListener() to true. Still i am getting events. But in JNDI 
i am not getting events which is the expected behaviour

Just to keep the session i just inserted a keyboard input stmt.

Repository repository = JcrUtils.getRepository( 
"http://localhost:8080/crx/server/");
Session session = repository.login(new SimpleCredentials("admin", 
"admin".toCharArray()),null);
EventListener listener = new DummyListener();
session.getWorkspace().getObservationManager().addEventListener(listener,Event.NODE_ADDED,
 "/", true, null, null, true);
session.getRootNode().addNode("tring");
session.save();
System.in.read();
session.logout();

Still i am getting events due to "session.getRootNode().addNode("tring");" 
________________________________
From: Jukka Zitting <jukka.zitting@gmail.com>
To: users@jackrabbit.apache.org
Sent: Tue, October 19, 2010 1:11:43 PM
Subject: Re: JCR event listenser unexpected behaviour when using wedav

Hi,

On Tue, Oct 19, 2010 at 9:36 AM, sriraj paul <srirajpaul@yahoo.co.uk> wrote:
> session.logout();

The event listener is tied to the session, so it'll get unregistered
as soon as you make the above call. You'll need to keep the session
open for as long as you're interested in receiving observation events.

BR,

Jukka Zitting



      

Mime
View raw message