Most browsers will timeout after a 15 minute request, so I can't imagine that a single page runs for 15 minutes. If you have such a long running process, consider putting it in another thread and hitting the users w/ some type of please wait... page that refreshes until the job is done. If the user logs out before the job is done, then do you need the results? In cases where you do, I pass the userID to the job and when the job is done it will let the user know via email.

-Aaron

Geoffrey Talvola wrote:

Chris Backas wrote:


Hello all,

We have an installation of WebWare that's configured to have a 15
minute session timeout period. In some extreme circumstances though,
a servlet request can occur that takes longer than this to process
(due to very involved database work involving a great many
operations).


My question is, does webware's session sweeper erase a session that's
passed its timeout period while it still hasn't finished its last
request?  We've gotten some odd behaviors in this situation and are
beginning to suspect this might be the case.   Can I disable a
particular session's time when I know that they're in an area
that may
result in this condition?  (It's a specific aspect of a specific
servlet that's not frequently used in this way)




You are right I think. The session sweeper only cares about the last time the session was accessed, and even if a servlet is still running, if it hasn't accessed the session in 15 minutes because it's doing database processing, then the session will get wiped out.

There are other ways to get these "session race conditions" too.  If a user
logs out, your logout code may clear out the session variables.  But if
there was another request still running in that session, it may suddenly see
the session get cleared out while it is processing, potentially resulting in
tracebacks or other misbehavior that the actual user never sees, but that
still may be emailed to the administrator if WebKit is configured to do so.

Anyhow, back to your issue, session objects have a timeout() method to get
the timeout in seconds and a setTimeout() method to set the timeout.  So you
should just be able to change the timeout temporarily with something like
this (completely untested):

   old_timeout = self.session().timeout()
   self.session().setTimeout(new_timeout)
   try:
       # long-running code goes here...
   finally:
       self.session().setTimeout(old_timeout)

- Geoff



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss






-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to