jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <...@tfd.co.uk>
Subject Re: eventListener doesn't work
Date Wed, 11 Mar 2009 17:20:46 GMT
After registering the event listener with the Observation Manager...  
what do you do with the session that was bound to the thread ?

If you logout or close the session, then the ObservationManger will  
also go... as its bound to the session and will get disposed.

Ian

On 9 Mar 2009, at 18:22, vkrejcirik wrote:

>  private ThreadLocal<Session> session = new ThreadLocal<Session>();
>
>  protected Session getSession() throws LoginException,  
> RepositoryException {
>      if (session.get() == null) {
>          Session session = repository.login(new  
> SimpleCredentials("admin", "admin".toCharArray()));
>                    this.session.set(session);
>      }
>      return session.get();
>  }


Mime
View raw message