jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkrejcirik <vkrejci...@gmail.com>
Subject Re: eventListener doesn't work
Date Sun, 15 Mar 2009 15:58:06 GMT
After registering the event listener I only call session.save(). I don't 
call close or logout.
While changing of property over POST servlet is calling session.save() ?


/**************************************/
Best regards / S pozdravem
Vladislav Krejc(ir(ík

http://www.vkrejcirik.info



Ian Boston napsal(a):
> 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