The socket backlog of HttpServer is still low.

KUBOTA Yuji kubota.yuji at lab.ntt.co.jp
Mon Dec 15 09:50:54 UTC 2014


Hi Ivan,

Thank you for your reply. My apologies for the late reply.

Unfortunately, I try to search the commit of this fix, but I could not find it.

So I wrote the patch to solve this problem. If set less than 1 to the second parameter
of HttpServer#create, HttpServer is created with the default socket backlog, i.e. 50([1]).

I think that JAX-WS should use the default socket backlog than specific low value like 5.
If there is a better method for openjdk community, please advise me.

-----

diff -r 48972b9b6536 drop_included/jaxws_src/src/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java
--- a/drop_included/jaxws_src/src/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java  Wed Oct 08 19:12:52 2014 +0100
+++ b/drop_included/jaxws_src/src/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java  Fri Dec 05 15:02:18 2014 +0900
@@ -79,7 +79,8 @@
                  state = servers.get(inetAddress);
                  if (state == null) {
                      logger.fine("Creating new HTTP Server at "+inetAddress);
-                    server = HttpServer.create(inetAddress, 5);
+                    // Creates a new HTTP server with default socket backlog.
+                    server = HttpServer.create(inetAddress, 0);
                      server.setExecutor(Executors.newCachedThreadPool());
                      String path = url.toURI().getPath();
                      logger.fine("Creating HTTP Context at = "+path);
-----

[1] http://hg.openjdk.java.net/jdk6/jdk6/jdk/file/tip/src/share/classes/java/net/ServerSocket.java#l199

Thanks,
Yuji

On 2014/11/24 21:15, Ivan Krylov wrote:
> Not sure what link [1] should be demonstrating. Could you send a link to the diff associated with the fix?
>
> Thanks,
>
> Ivan
>
> On 21/11/2014 07:03, KUBOTA Yuji wrote:
>> Hi all,
>>
>> JDK7 and JAX-WS RI 2.2.6 solved the low socket backlog of HttpServer [1].
>> However, JDK6 still provides the HttpServer which is created with socket backlog 5 [2].
>>
>> I could not find the reason why this change do not backport to JDK6.
>> Please backport it or update JAX-WS of JDK6, if there is not a blocker of this issue.
>>
>> Thanks,
>> Yuji.
>>
>> [1]:https://java.net/jira/browse/JAX_WS-945
>> [2]:http://hg.openjdk.java.net/jdk6/jdk6/jaxws/file/48972b9b6536/drop_included/jaxws_src/src/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java#l82




More information about the jdk6-dev mailing list