On 11/21/2011 5:26 PM, Caldarale, Charles R wrote:
From: Jess Holle [mailto:je...@ptc.com]
Subject: javax.servlet.ServletRequest and thread safety...
Is there an issue with multi-threaded access here or am
I imagining things?
There is an issue, and it's highly unlikely to ever be changed.  The spec 
defines the APIs as not thread-safe, so there is zero impetus to make them so 
and thereby impact performance.
Okay. So the workaround appears to be to call getParameterMap() [for starters] prior to any potential access by another thread.

Clearly there should be *some* way to add a means to peak on requests in progress in detail (including their parameters) -- irrespective of what the spec says.

From a quality of implementation standpoint this shouldn't have to copy all the request data -- but forcing it to be obtained once prior to access by other threads is quite reasonable.

--
Jess Holle


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to