diff options
-rw-r--r-- | server/src/com/vaadin/server/communication/PushRequestHandler.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/communication/PushRequestHandler.java b/server/src/com/vaadin/server/communication/PushRequestHandler.java index 8d0da24896..aff07d96d7 100644 --- a/server/src/com/vaadin/server/communication/PushRequestHandler.java +++ b/server/src/com/vaadin/server/communication/PushRequestHandler.java @@ -18,6 +18,7 @@ package com.vaadin.server.communication; import java.io.IOException; +import javax.servlet.ServletConfig; import javax.servlet.ServletException; import org.atmosphere.client.TrackMessageSizeInterceptor; @@ -56,11 +57,22 @@ public class PushRequestHandler implements RequestHandler, public PushRequestHandler(VaadinServletService service) throws ServiceException { + final ServletConfig config = service.getServlet().getServletConfig(); + atmosphere = new AtmosphereFramework() { @Override protected void analytics() { // Overridden to disable version number check } + + @Override + public AtmosphereFramework addInitParameter(String name, + String value) { + if (config.getInitParameter(name) == null) { + super.addInitParameter(name, value); + } + return this; + } }; pushHandler = new PushHandler(service); @@ -84,7 +96,7 @@ public class PushRequestHandler implements RequestHandler, "false"); try { - atmosphere.init(service.getServlet().getServletConfig()); + atmosphere.init(config); // Ensure the client-side knows how to split the message stream // into individual messages when using certain transports |