cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: HttpSessionBindingEvent
Date Sun, 17 Aug 2003 19:17:16 GMT
Jeremy Quinn wrote:

>
> On Saturday, August 16, 2003, at 09:51 PM, Sylvain Wallez wrote:
>
>> Jeremy Quinn wrote:
>>
>>> Hi All
>>>
>>> Sorry, this is part of the Servlet spec I have had little use for in 
>>> the past.
>>>
>>> I don't think HttpSessionBindingListener/HttpSessionBindingEvents 
>>> are available in Cocoon, but I think they are supposed to be the way 
>>> to solve a problem I have.
>>
>>
>>
>> Yes, they _are_ available, as long as your application runs as a 
>> servlet (i.e. HttpEnvironment), since in that case the Cocoon Session 
>> (interface o.a.c.environment.Session) is simply a wrapper around a 
>> servlet HttpSession.
>
>
> Ah Ha!!
>
> Many thanks for the clarification!!
>
> 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.

>>> I am planning a Job Manager, shared by a FlowScript in the Context 
>>> (?), between a group of people who will share work on a batch of 
>>> jobs between them, and need to lock jobs from each other while they 
>>> are working on them.
>>
>>
>>
>> Same for Context : this is a wrapper around the ServletContext.
>>
>>> I need to have Jobs unlocked if a user with their lock has their 
>>> Session time out.
>>>
>>> Sounds familiar?
>>> Any suggestions?
>>> Or am I barking up the wrong tree?
>>
>>
>>
>> [just curious : is "barking" the dog's sound in this context ?]
>
>
> Indeed! It is actually the verb, ie. when a dog goes "Woof! Woof!" it 
> is barking .... they also growl, yelp, whine and howl ;)
> If you say a Human is barking, you are saying (in slang) that they are 
> Mad ....
> The noun, bark is the (crinkly brown etc.) covering on a tree ....
> There is also is a (not so lovely) town in Essex called Barking (my 
> apologies to any residents :)


Thanks for this explanation (and also to Geoff, and to Joerg off-list). 
I was wondering about "bark" since, as a noun, it has two meanings 
related to dogs and to trees (see 
http://www.wordreference.com/english/definition.asp?en=bark)

> PS, my favourite onomatopoeia in French is "ronronner" :) 


For non french speakers : "ronronner" is "to purr", i.e. what a cat does 
when it's happy.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message