Lucy wrote:
>
> I have the Servlet Spec v2.3 Draft 1, ... there's only a
> couple of lines on Threads.
>

 Draft 2 is the newest, but it shouldn't make much
difference for the purposes of this thread...

 There's discussion throughtout the spec on the
guarantees that a servlet container makes. There's
probably a couple pages worth if you stuck them all
together, but I suspect the problem that you're
running into is that the spec simply offers very
few guarantees when it comes to threads.

 The only guarantee you're likely to ever
need to worry about is: no guarantees about
service(). So you're back to standard non servlet
specific Java thread safety issues.


> As I said, I loathe session tracking Cookies as a
> user, so prefer to minimise them as a developer, but
> not in scenarios where it would be unwise to do so.
>

 Fair enough, but servlets are more or less agnostic
on the whole url-rewriting vs cookies issue, and
abstract both session tracking mechanism into a
common session api, right?

 The methods are not totally equivelent, so you've
got to be careful with edge cases (the multiple
windows/same browser/two logins problem that you
get with url-rewriting, for example) There is a
substantial amount of dicussion of the edge cases
in the servlet-interest archives.

 And of course you've got to remember to encode all
the url's you generate if you expect there is a chance
that you will need to support url-rewriting based
session tracking. But that's all covered in the spec
and in the books.


> I'd looking for literature that provides debate on Thread
> Safety in Servlets rather than just adopting a blanket
> presumption of Cookie session tracking.
>

 I'm with Gokul: I don't understand the what you're
saying about the relationship between session tracking
and threads. Could you explain further?


> So, if any one can point me to some specific reading
> debating Thread safety in Servlets, an online article,
> a book, or whatever, I'd very much appreciate it.
>

 Are you talking about SingleThreadModel? Or issues
with distributed containers? Interaction of the servlet
lifecyle with threading? Spawning new threads from
servlet methods? Accessing the req/rsp objects from
one thread in another thread? Synchronizing access
to session resources?

 If not, then there's really nothing to debate: Many
threads from the same or different users may be in
the service() method of a single servlet simultaneously.
That's all the guarantees you get.

 If you could be more specific, it might help me
understand exactly what you're asking for. I suspect
I'm still missing the point of your questions...


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to