jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: [servlet-spec users] Re: NIO specification clarification

From: Rémy Maucherat <rmaucher_at_redhat.com>
Date: Thu, 11 Apr 2013 09:32:59 +0200

On 04/11/2013 03:25 AM, Mark Thomas wrote:
> If there is a good reason for this limitation then I'll have to give
> up on my container neutral implementation and use container specific
> APIs to control the blocking as that will enable me to implement it
> with the single container thread limitation.
The reasons for this behavior are:
- The Servlet API objects (request, response, etc) are not thread safe,
so the user would have to sync all accesses
- It is easier for the user's code (no sync to put in place)
- IMO this is better for resources use (one request = one thread used at
most)

Rémy