Does not use the new heartbeat mechanism in Atmosphere 2.2 because the heartbeat
mechanism will cause the client to reconnect every 60 seconds when idle.
It does not currently work with Vaadin because no onreopen event is fired by
Atmosphere (https://github.com/Atmosphere/atmosphere-javascript/issues/141) and thus
Vaadin will wait forever for Atmosphere to indicate that the connection is available
again after the disconnect.
Change-Id: I3a61b2c5d611f09c3092f817834e6382e1ca9894
<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" />
<?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"
// 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"
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;
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(
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
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"