I have a GWT webapp, running under Tomcat, with the following remote service:
public class MyServiceImpl extends RemoteServiceServlet implements MyService {
@Override
public void doIt() {
System.out.println(Thread.currentThread() + " " + this);
try {
Thread.sleep(50 * 1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
System.out.println(e.getMessage());
}
System.out.println(Thread.currentThread() + " " + this + " I have done waiting ");
}
}
On my page I have a button, which, when clicked calls the service. The problem is, if I press the button two times, from three separate browser tabs, only the first two are executing, the third gets queued and executes as soon as one of the first two finishes. What should I modify to allow any number of requests to happen in the same time?
The connector in server.xml is:
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="50" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="160000"
maxKeepAliveRequests="15"/>
There’s a limit on the number of open connection a browser can keep with a server. RFC says “should not have more than 2”, 2 for IE 6&7, but it could be more like 4-8 in the new ones. It’s possible to configure IE to allow more: http://support.microsoft.com/?kbid=282402.