Atmosphere will disconnect the push connection when going offline and reconnect it
when going online again. There are no events sent when this happens, which means the
reconnect logic cannot take this into account.
Having it enabled leads to something like:
1. Browser goes offline, push is disconnected
2. Framework sees it as a normal close and does not show the reconnect dialog
3. The user does something, the framework tries to send a websocket request
4. A new Atmosphere request is created and enters a try-to-reconnect loop as expected
5. The browser goes online, and the online event re-initializes the old connection
although a try-to-reconnect loop is already running
Change-Id: I5dcef768783142e2c7b4e7c821353addb0ec3d28
Use same reconnect logic for Push as for XHR (#17075)
* No longer queue message separately in PushConnection
* Use XHR for client to server communication when using long polling (or streaming)
* Websocket is used for communication in both directions
Note that using XHR for client to server responses at the same time
as a push connection is open means we must take into account on the
client side that we may receive message in the wrong order. This
will be addressed in the following change.
Change-Id: I97706db3481379593e71dc5bb552727a0486692b
* Initialize Atmosphere in a context listener as JSR-356 requires
* Do not run JSR-356 or websocket tests on servers without support
* Adds /run-jsr356/ for testing JSR-356 websockets with uitest.war
* Change push path to /PUSH (from /PUSH/) to be compatible with JSR 356
endpoint mappings in Atmosphere (#14381)
Change-Id: Iec43f26df8c7b2bd347a713623a5298cc9e7b2cd
Breaks long polling fallback when implemented this way
This reverts commit 735f074834.
Conflicts:
push/build.xml
push/ivy.xml
server/src/com/vaadin/server/Constants.java
uitest/src/com/vaadin/tests/push/PushPathTest.java
Change-Id: I07f6fedafc648b0ee403865ccb322017d2a8d571
In order to use websockets with Weblogic 12.1.2 or later, push path 'ws'
needs to be used instead of 'PUSH'.
Change-Id: Ia90d11c20a375cef9cf4a53986a70d616a83db06
Appending query param with vaadin version to js files (#12210)
while #7868 is supposed to solve the overall issue, this solves a big
part of the upgrade + cached files issues quickly.
When I use vaadin themes, I have control over how they are included, so
I can add a vaadin version number to it. For the default JS I cannot.
Change-Id: Ica1cddee417946aa32116eb09882a3dc6c2924a6
Remove csrfToken if disable-xsrf-protection is true (#14111)
If the server sends no token and the client value remains "init" then
it's not sent back to the server.
Change-Id: I74fc470c5c22d57c4a48eab3e4476ae4cc2dd242
Disable client timeout so websockets are not disconnected when idle (#13015)
Updated sleep method to ensure that long sleeps can be performed without losing
the connection to the browser
Change-Id: I4f29d946e7a9a400e303e3a574876e1bc2d56773
Force connection to closed state on reconnect (#12853)
IE10+ does not call onabort when the streaming connection is aborted.
As a result, onclose is never called and the client side does not
change the connection state away from "connected". This results in
user actions not being queued on the client side, instead the client
tries to send them immediately, leading to an eternal spinner.
If this can be fixed in Atmosphere somehow, it should. This is a
workaround until then.
Change-Id: Icd1a86ac9775d1a7d9c0bc1dee0fd399e2bf2266
* Atmosphere 2.0 has changed enableProtocol to default to true.
* Reopening a connection in Atmosphere 2.0 is signalled through an onReopen event (not present at all in Atmosphere 1.0.x)
Fix was backported from master
Change-Id: I6ed258087a0b3a06440ab9d19b621560fa4f998f
Merge: no
Atmosphere 2.0 has changed enableProtocol to default to true.
Reopening a connection in Atmosphere 2.0 is signalled through an onReopen event (not present at all in Atmosphere 1.0.x)
Change-Id: I6013a83a0239b6ab7535631120e442ece2d4481d
Handle push disconnections and reconnections more reliably (#11831, #11922)
Client-side:
* Call onOpen() also after a successful reconnection
* Reliably call onClose() and try to reconnect after disconnection
* Don't try to reconnect if !isApplicationRunning() after push
* Queue messages while trying to reconnect (state CONNECT_PENDING)
Server-side:
* Implement AtmosphereResourceEventListener.onDisconnect()
* Push marked as pending until client reconnects (if ever)
Change-Id: I1783eb72eb7005b07cae786d8ec8371da3903108
Use "\0" instead of "|" as a push message delimiter (#11692)
Used with TrackMessageSizeInterceptor and with client-to-server Websocket message splitting (see #11648)
The original issue that the delimiter can not appear in the message (unescaped) is apparently fixed in Atmosphere 1.0.13
Also ensure the max size of a websocket fragment in bytes does not exceed the buffer size (#11842)
Change-Id: I768524bb54a5b8b9479dc7bda821256bd843dc52
Split client-to-server messages when websockets are used (#11648)
* First part of a fragmented message prefixed by total message length plus '|'
* Atmosphere websocket buffer size set to 65536
* Fragment size is 65535 characters (Jetty requires less than buffer size)
Change-Id: I8bf872bbb03b86386070fdc99c14ea805dd2ef3a
Verify CSRF token before accepting new CSRF connection (#11635)
* Can't open push connection during client-side init because CSRF token
is not available at that point. This allows simplifying the
initialization because the push state will not be checked until the
first response has been processed.
* Add helper for checking the CSRF token
Change-Id: I31da1ac669dc9a581cbd66f58c07f10ea4b8b676
* Add PushConnection interface and rename old class to
AtmospherePushConnection
* Define deferred binding to use AtmospherePushConnection by default
* Redesign connection and disconnection workflow to better cope with
situations where connection is quickly toggled
Change-Id: I9b9427c2df40d446a25895eb39e7b166cb929a85