Jari Worsley wrote:
> Session scope beans are available to a user and their browser session (I'm 99% sure
> that one session corresponds to connection from one browser program).
> So if a user has two browser windows open accessing pages on your site, then they
> can potentially create simultaneous requests that access the same bean in session
> scope. So session beans need to be thread safe.
>
That is one case where multiple threads can work on the same session (it actually
depends also on which browser you are using, and whether you're using cookies or URL
rewriting, but sharing sessions is the most common scenario). Here is another.
If you are using frames in your UI, the individual requests for the various frames
will often be in progress simultaneously (for example, by default Netscape issues up
to four simultaneous requests). If all of the frames participate in your session --
the usual case -- then you will quite often have multiple threads accessing your
session variables at the same time.
Moral of the story -- you need to ensure that any interactions with your session beans
are thread safe.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html