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();
 }

Reply via email to