tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik" <>
Subject Session Replication/Clustering 4.1.x JDK NIO Bug fixes
Date Thu, 03 Apr 2003 02:46:23 GMT
hey ya'all,

Running today on Solaris I discovered a bug in the way java.nio is
implemented on Solaris 8(Intel) JDK 1.4.1. This problem could exist in other
JDK versions as well.

The problem is that when a thread reading from a socket channel calls
selector.wakeup(); the selector doesn't wakeup from its sleeping state.
Hence the replication works exactly once only.

I have added in a sleep timeout for the selector (in server.xml the property
tcpSelectorTimeout has been added).

Play around with this timeout, setting it to small means CPU times goes to
waking up the thread. Setting it to high means you can get some delay in
your replication. I have defaulted it to 100ms.

The new version including updated documentation can be found at

The same fix has been applied to the Tomcat 5 CVS branch

Best regards.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message