// open a channel and bind
ServerSocketChannel serverChannel = ServerSocketChannel.open();
ServerSocket serverSocket = serverChannel.socket();
serverSocket.setReuseAddress(false); // fix for Apple JVM bug 3922515
InetSocketAddress listenAddress = new InetSocketAddress(listenPort);
serverSocket.bind(listenAddress);
// prepare for non-blocking, selectable IO
serverChannel.configureBlocking(false);
serverChannel.register(connectionManager.getNIODaemon().getSelector(), SelectionKey.OP_ACCEPT);
connectionManager.getNIODaemon().setServer(connectionManager);