Passing HttpServletRequest to the WebSocketProcessor#handshake in Glassfish 3.x

By the time the server reaches the handshake method, the clietn receives onOpen notification.
If you write any error result code and status message to the request and than return "false" from the handshake method, the client websocket is closed - onClose callback is called , but no status code or error message is delivered to the client.