// if it is not IE8, we do not want to have multiple connections
HttpSession session = req.getSession(true);
Client otherConnection = (Client) session.getAttribute("org.persvr.channel");
if (otherConnection != null && otherConnection != eventStream) {
//TODO: Send reconnect advice
otherConnection.fire(new ConnectionConflict()); // if there is another connection, we need to notify it
}
session.setAttribute("org.persvr.channel",eventStream);
}
else
resp.setHeader("XDomainRequestAllowed", "1"); // allow this so we can support streaming in IE8