Atmosphere/atmosphere — Issue #69: Wicket-Ajax-Rendering in Websocket Thread. (Jetty8)
Author: mcbain
Created: 2011-11-18 12:05:08+00:00
State: open

I try to do a full wicket ajax rendering from AtmosphereResourceEventListener.onBroadcast().
Unfortunaly accessing some attributes from the Original Jetty-Request result in NPE. I guess its Thread-local related, since the WebSocket-Thread is not the same as the original Request.

/**
* Starting with 7.5.x and 8.0.2, the internal Jetty's Request object gets recycled once the handshake occurs,
* hence we need to cache the original value. Since a WebSocketProtocol handler can wrap the request, we must first
* do it here to avoid all kind of issue with Jetty.
*/

JettyWebSocketHandler.JettyRequestFix should also save the serverName and serverPort and override also the following methods.

@Override
public HttpSession getSession(boolean create) {
return httpSession;
}