tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Claborn <mi...@claborn.net>
Subject Re: Immediately persist sessions to database
Date Tue, 07 Jul 2009 19:49:56 GMT
That worked great.  Thanks.


Mitch Claborn




Rainer Jung wrote:
> On 07.07.2009 18:21, Mitch Claborn wrote:
>   
>> I'm experimenting with writing some code to persist a session to the
>> database, similar to org.apache.catalina.session.PersistentManager and
>> org.apache.catalina.session.JDBCStore, but to store it immediately after
>> the end of a user request, when the session goes out of "scope".  Any
>> pointers on where to start?
>>
>> I've played a bit with extending or replacing the above classes, but it
>> looks like the backgroundProcess(), which is the starting point of the
>> logic that persists sessions is only called every 10 seconds from the
>> Container.
>>
>> Is there a way for a Manger to get control when a session goes out of scope?
>>     
>
> You could look at the ReplicationValve which is part of the cluster and
> triggers replication at the end of request handling. A valve can
> interfere with request processing very early and very late in the
> request lifecycle and can use internal Tomcat classes (the main
> difference between a valve and a filter).
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>   

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message