On Tue, 23 May 2000, Varalakshmi Allamaraju wrote:
[..]
> 1. Request and response objects should be used only in the context of a
> request. Refer to the spec.
Even if it weren't for the spec, common sense would have gotten us
there...
>
> 2. In a distributed container, the container may serialize/deserialize
> contexts and sessions whenever required - except during the context of a
> request. This is the sort of behavior that we can expect from a
> distributable container with a distributable application.
Quite nicely put. And I presume, it is safe with the spec to believe that
a request's context ends when the servicing method exits. Therefore, we
can all happily agree that it is OK to use threads inside a service method
of a servlet, provided you make sure that the 'dangerous' parts are done
before the service method exits.
Pity we cannot move hands in this list, otherwise we would have saved
bandwidth:-)
> Under these circumstances, object references that another thread may be
> holding may not be valid outside the context of a request. In these
> cases, without kludgy programming, it would be difficult to "put back"
> the manipulated resources.
I am not sure that the people who developed ATG's Dynamo application
server would appreciate the term 'kludgy':-) I think they were doing
seamless session revival along a cluster of web servers even if you pulled
the power plug on one of them, before the spec thought about that.
But I am sure they would agree that the coding to achieve this is not
trivial.
Kostas
[..]
___________________________________________________________________________
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