There's also the HttpSessionBindingListener in servlet 2.2. When an 
object implementing this interface is stored as a session attribute, its 
valueBound() method is called, and when it's removed from the session or 
when the session is destroyed, the valueUnbound() method is called.

Jörg Prante wrote:
> Torsten,
> 
> did you have a look at Servlet API 2.3 session attribute listeners at 
> javax.servlet.http.HttpSessionAttributeListener? I used this to keep track of 
> session information e.g. users. Your "finalize" approach look much like the 
> attribute removal method. Cocoon 2 should use the methods of the Servlet 2.3 
> API as well, there is no need to re-invent the wheel.
> 
> Jörg
> 
> Am Sonntag,  2. September 2001 16:00 schrieb Torsten Curdt:
> 
>>I'd like to propose to extend the Session interface
>>with some kind of messaging functionality.
>>
>>I'd like to keep track of the users that are currently
>>logged into our app. Right now I don't see any other
>>way of doing this but to extend the Session interface
>>
>>interface Session {
>>  ...
>>  public void addFinalizeListener( FinalizeListener l);
>>}
>>
>>interface FinalizeListener {
>>  public void finalizeOf( Object current );
>>}
>>
>>and then call the added Listeners in the finalizer of the
>>Session implementing classes.
>>This would give a lot more information of the magical
>>session thing that comes from the differen servlet
>>engines.
>>
>>But of course I might have again missed something ;)
>>...so what do you guys think ?
>>--
>>Torsten
>>

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to