diff options
-rw-r--r-- | push/build.xml | 2 | ||||
-rw-r--r-- | push/ivy.xml | 4 | ||||
-rw-r--r-- | server/src/com/vaadin/server/Constants.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/server/communication/PushRequestHandler.java | 7 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java | 3 |
5 files changed, 13 insertions, 5 deletions
diff --git a/push/build.xml b/push/build.xml index 0a106f5023..b7d57cf4d3 100644 --- a/push/build.xml +++ b/push/build.xml @@ -16,7 +16,7 @@ <property name="vaadinPush.debug.js" location="${result.dir}/js/VAADIN/vaadinPush.debug.js" /> <!-- Keep the version number in sync with ivy.xml, server/src/com/vaadin/server/Constants.java --> - <property name="atmosphere.runtime.version" value="2.1.2.vaadin6" /> + <property name="atmosphere.runtime.version" value="2.2.4.vaadin2" /> <property name="jquery.js" location="lib/jquery/jquery-1.11.0.js" /> <path id="classpath.compile.custom" /> diff --git a/push/ivy.xml b/push/ivy.xml index fef53b4c9b..b899b34af7 100644 --- a/push/ivy.xml +++ b/push/ivy.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ivy-module [ <!-- Keep the version number in sync with build.xml --> - <!ENTITY atmosphere.runtime.version "2.1.2.vaadin6"> + <!ENTITY atmosphere.runtime.version "2.2.4.vaadin2"> - <!ENTITY atmosphere.js.version "2.1.5.vaadin4"> + <!ENTITY atmosphere.js.version "2.2.6.vaadin3"> ]> <ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java index 5841bfac4d..02a992a882 100644 --- a/server/src/com/vaadin/server/Constants.java +++ b/server/src/com/vaadin/server/Constants.java @@ -67,7 +67,7 @@ public interface Constants { // Keep the version number in sync with push/build.xml and other locations // listed in that file - static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.1.2.vaadin6"; + static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.2.4.vaadin2"; static final String INVALID_ATMOSPHERE_VERSION_WARNING = "\n" + "=================================================================\n" diff --git a/server/src/com/vaadin/server/communication/PushRequestHandler.java b/server/src/com/vaadin/server/communication/PushRequestHandler.java index 308f94686f..b1a8ea25a7 100644 --- a/server/src/com/vaadin/server/communication/PushRequestHandler.java +++ b/server/src/com/vaadin/server/communication/PushRequestHandler.java @@ -28,6 +28,7 @@ import org.atmosphere.cpr.AtmosphereFramework; import org.atmosphere.cpr.AtmosphereInterceptor; import org.atmosphere.cpr.AtmosphereRequest; import org.atmosphere.cpr.AtmosphereResponse; +import org.atmosphere.interceptor.HeartbeatInterceptor; import com.vaadin.server.RequestHandler; import com.vaadin.server.ServiceDestroyEvent; @@ -102,6 +103,12 @@ public class PushRequestHandler implements RequestHandler, atmosphere.addInitParameter(ApplicationConfig.MESSAGE_DELIMITER, String.valueOf(PushConstants.MESSAGE_DELIMITER)); + // Disable heartbeat (it does not emit correct events client side) + // https://github.com/Atmosphere/atmosphere-javascript/issues/141 + atmosphere.addInitParameter( + ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTORS, + HeartbeatInterceptor.class.getName()); + final String bufferSize = String .valueOf(PushConstants.WEBSOCKET_BUFFER_SIZE); atmosphere.addInitParameter( diff --git a/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java b/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java index e7a74775bf..182a2e67e4 100644 --- a/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java +++ b/uitest/src/com/vaadin/tests/push/TrackMessageSizeUI.java @@ -30,6 +30,7 @@ import com.vaadin.server.VaadinService; import com.vaadin.server.VaadinServletService; import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.ui.JavaScriptFunction; + import elemental.json.JsonArray; // Load vaadinPush.js so that jQueryVaadin is defined @@ -39,7 +40,7 @@ public class TrackMessageSizeUI extends AbstractTestUIWithLog { private String testMethod = "function testSequence(expected, data) {\n" + " var request = {trackMessageLength: true, messageDelimiter: '|'};\n" + " _request = {trackMessageLength: true, messageDelimiter: '|'};\n" - + " _handleProtocol = function(a,b) {return true;};" + + " _handleProtocol = function(a,message) {return message;};" + " var response = {partialMessage: ''};\n" + " var messages = [];\n" + " for(var i = 0; i < data.length; i++) {\n" |