provider.sessionManager.getLoggedInUser(resource.getRequest().getSession(false));
AtmosphereConnection connection = new AtmosphereConnection(loggedInUser, provider);
resourceChannel = connection.getAtmosphereChannel();
resourceSession.setAttribute(WAVE_CHANNEL_ATTRIBUTE, resourceChannel);
resourceChannel.onConnect(resource);
}
resource.setBroadcaster(resourceChannel.getBroadcaster()); // on every
// request