cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: HttpSessionBindingEvent
Date Sun, 17 Aug 2003 21:18:37 GMT

On Sunday, August 17, 2003, at 08:17 PM, Sylvain Wallez wrote:

>> So if I understand correctly, the way to do this is to keep a 
>> UserManager (a Map of Users, implements HttpSessionBindingListener) 
>> in the Context, while also keeping a copy in each Session. When the 
>> UserManager is unbound, it can remove the User. Or something like 
>> that anyway.
>
>
> Mmmh... This should work, but IMO it would be cleaner if this was not 
> UserManager that implements HttpSessionBindingListener, since it's a 
> gobal object, but the User object or some other session-related > object.
>

Yeah, I have a slightly different scheme, but it is untested while I 
work on other test units.
It maybe has the same flaw ....

My JobManager is stored in both the Context and each User's Session, it 
implements HttpSessionBindingListener.

When I take something, I give the session.id of the Taker to the Job, 
and the Job to the JobManager's Taken Map, (I use the Session.id so the 
User can work in multiple windows if they want, and only the window's 
session that times out, releases it's lock).

When unBound is called, the JobManager can get the id of the Session 
and release any Jobs with this id.

That's the theory anyway ;)

Thanks for your help

regards Jeremy

PS. Thanks for explaining "ronronner" :)


Mime
View raw message