jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: Servlet 3.1 EDR updated draft

From: Greg Wilkins <gregw_at_intalio.com>
Date: Tue, 5 Jun 2012 12:22:55 +0200

On 5 June 2012 00:38, Rajiv Mordani <rajiv.mordani_at_oracle.com> wrote:
> Like I said - we can look into what Remy referred to as sendFile but after
> EDR please.


Rajiv,

I don't see this as an issue of sendFile or not. Even if we had
send file in the API, I'd still recommend users to send static content
by a named dispatch to the default servlet, as this will deal with a
wider range of HTTP issues (content headers, caching, if-modified,
e-tags etc. etc.).

This is an issue of the ability to limit the memory footprint of the
server and avoid OOMs. With the current proposal, an application
that creates even a modestly sized shared content that is sent to
multiple connections can cause unlimited memory growth as each
connection may be required to take a copy of the shared resource.

It is against the objective of scalability to have unconstrained
memory contracts in the API.


regards