HttpServer - what is maximum threads allowed to connect?
I'm using Java6 and the HttpServer that comes with it. But I've hit a maximum that I cannot find what the value is or how to set it higher. I'm getting connection refused once that max is hit.
HttpServer server = HttpServer.create(new InetSocketAddress(8000), 0);
server.createContext("/admin", new AdminHandler());
server.setExecutor(Executors.newCachedThreadPool());
server.start();
It must be in the newCachedThreadPool() used.I like that it will reuse idle threads, and close them once an idle period passes, so that the number of threads does not grow or need to be fixed. But... I'm unclear as to how many incomming connections this will allow. Or how to change that default?
Or, should I be using another kind of Executor?
Thanks for any help.
-G

