Closed glassfishrobot closed 14 years ago
@glassfishrobot Commented Reported by iminar@java.net
@glassfishrobot Commented jfarcand@java.net said: Bump version
@glassfishrobot Commented jfarcand@java.net said: OK I've added the setForceKeepAlive(true/false) on the SelectorThread directly:
Sending http/src/main/java/com/sun/grizzly/http/ProcessorTask.java Sending http/src/main/java/com/sun/grizzly/http/SelectorThread.java Transmitting file data .. Committed revision 2851.
@glassfishrobot Commented Was assigned to grizzly-issues
@glassfishrobot Commented This issue was imported from java.net JIRA GRIZZLY-489
@glassfishrobot Commented Marked as fixed on Wednesday, December 16th 2009, 6:14:16 pm
The purpose of the forceKeepAlive() method is to make grizzly handle a request as if it was a keep-alive request even when it's not. The reason for this is that if an extension wants to deregister a key from the grizzly selector and register it with its own selector and while doing that it wants to use blocking io, grizzly will close the socket channel, interrupting the response transmission.
— DefaultProcessorTask.java.orig 2009-02-18 20:54:29.000000000 -0800 +++ DefaultProcessorTask.java 2009-02-18 22:43:16.000000000 -0800 @@ -2228,5 +2228,16 @@ public boolean getDisableUploadTimeout()
{ return disableUploadTimeout; }
+ +
{ + keepAlive = true; + connectionHeaderValueSet = true; + }
+ } I understand that this is a hack because I basically take advantage of the fact that keepalive connections are being closed differently than non-keepalive connections.
JFA: I agree with the method. Just file an issue and I will add it (I will change the javadoc). An alternative is to expose setKeepAlive but I think it could be useful to have forceKeepAlive.
Full thread: http://www.nabble.com/High-latency-of-ARP-calls-in-Glassfish-v2-td20104797.html
Environment
Operating System: All Platform: Macintosh
Affected Versions
[1.9.9]