IPageManager pageManager = session.getPageManager();
try
{
Page page = (Page) pageManager.getPage(pageId);
WebSocketRequestHandler target = new WebSocketRequestHandler(page, connection);
WebSocketPayload payload = createEventPayload(message, target);
page.send(application, Broadcast.BREADTH, payload);
if (!(message instanceof ConnectedMessage || message instanceof ClosedMessage))
{
target.respond(requestCycle);
}
}
finally
{
pageManager.commitRequest();