views:

294

answers:

1

Can anyone suggest a simple setup of a servlet in java that supports pipelining?

(It is for unit testing, so simplicity is better than scaleability).

+2  A: 

The server side request queue is provided by application container and not by servlet itself.

In case of Tomcat the component responsible for that is called Connector which can be configured (server.xml) in terms of the number of threads that serve incoming requests, timeout that request can stay unprocessed in the queue, the size of the queue, etc.

Have a look at Tomcat Connector documentation, I believe the most important would be 'acceptCount', 'maxThreads', 'connectionTimeout', 'maxKeepAliveRequests' (if you require http keepAlive ).

Gennady Shumakher