Gabe said:
> I didn't think about tool initializiation as the primary problematic
> situation. Much more likely are threading problems if a tools uses
> read-write instance variables. Synchorniszation wouldn't help in all
> such cases.

No, not at all.  Mutable instance variables are not a problem for session
tools.  Each separate browser that connects to a servlet that uses sessions
gets its own unique session.  This session can be created upon initial
request or upon some sort of login action, and it will remain associated
with _only_ that browser until it either times out or is invalidated by a
logout action of sorts.  Even if the same user opens the site in a new
browser (not just a new window of the same browser instance), that browser
will get a new session of its own.  So even though multiple requests
(threads) may be executing for the same session, as in the frameset
situation you propose (and i'd venture to say that that is a highly uncommon
situation), all of those requests will be using the same session object and
therefore, their own unique set of session tool instances.  Requests made
for other sessions will have their own instances of those tools.  So i
repeat again, the only scope-placement in the servlet environment where
thread-safety is a legitimate concern is the application scope.

Nathan Bubna
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to