Configure timeouts for http and https
The http server invoker looks for a configured timeout value at initialization time, which it uses to set the "connectionTimeout" property on its Tomcat connector. (See Section HTTP Invoker for more information.) Note that subsequent calls to setTimeout() will have no effect. The http client invoker treats timeouts configured for the connection and per invocation timeouts the same, since it opens a new HttpURLConnection with each invocation. Any nonnegative per invocation timeout value will override a timeout value configured at client invoker creation time. If the application is using a jdk of generation 1.5 or later, then the client invoker will use the java.net.HttpURLConnection methods setConnectTimeout() and setReadTimeout() methods. Note that in this case the timeout value will be allowed twice, once to create the connection and once to read the invocation result. If an earlier jdk is being used, the client invoker will simulate a timeout by making the connection and executing the invocation in a separate thread, which it waits on for the specified timeout. The threads are drawn from a thread pool, which is configurable. A custom thread pool may be set by calling the HTTPClientInvoker method public void setTimeoutThreadPool(org.jboss.util.threadpool.ThreadPool pool); where the ThreadPool interface is available from the anonomous JBoss svn repository at http://anonsvn.jboss.org/repos/common/common-core/trunk/src/main/java/. If a thread pool is not set, it will default to an instance of org.jboss.util.threadpool.BasicThreadPool, which may be configured with the following parameters, defined as constants in org.jboss.remoting.transport.http.HTTPClientInvoker: MAX_NUM_TIMEOUT_THREADS (actual value "maxNumTimeoutThreads"): the number of threads in the threadpool. The default value is 10. MAX_TIMEOUT_QUEUE_SIZE (actual value "maxTimeoutQueueSize"): the size of the thread pool queue, which holds execution requests when all of the threads are in use. The default value is 1024.