struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dun...@sapio.co.uk (Duncan Harris)
Subject Re: Long term Session attributes [ was RE: Wizard Interface question ]
Date Thu, 01 Jan 1970 00:00:00 GMT
peter.pilgrim@db.com (Peter Pilgrim) wrote:

> Have a background thread or even better a java.util.Timer
> on each session object or per user.
> The sleeper or swiper continuous timer wakes up every
> 10 minutes or so iterates through the attributes in the session
> looking especially for Leasable object.  Remove any Leaseable
> object that has expired the maximum idle time.

Got to be a bit careful about threading issues here.
Code inside struts does:

  use getAttribute() to get form
  ...
  do some tests on attribute
  ...
  return form for processing
  
So if your sweeper does its delete after the getAttribute()
your JSP page may well be unhappy.

Duncan Harris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hartford, Cheshire, U.K., Tel: 07968 060418
Looking for STRUTS contract work in the U.K.

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message