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 Communications Server, such that the selector is unwrapped before the keyFor API is called. This enables the keyFor to succeed until JDK bug is fixed.