Sun GlassFish Enterprise Server 2.1 Release Notes

ASQuickStartup breaks SocketChannel.keyFor(), returning null instead of the SelectionKey (Issue Tracker 3027)


When a SocketChannel is registered on several Selectors, doing socketChannel.keyFor(lastRegisteredSelector) returns null instead of the SelectionKey.


This is related to a JDK bug, 6562829, and is expected to be fixed in 6.0 U3. A workaround has been included in Enterprise Server 2.1, such that the selector is unwrapped before the keyFor API is called. This enables the keyFor to succeed until JDK bug is fixed.