Description
With Spring Session in action, Vaadin PUSH feature is not working.
When the Vaadin application is loaded, the PUSH connection is established, but then, since AtmospherePushConnection
(the component responsible for bidirectional handling of messages between browser and server through AtmosphereResource
) is part of the UI, it gets serialized and deserialized during every request.
The internal AtmosphereResource
is transient, so it is null after deserialization, effectively preventing the communication with the browser. For this reason, AtmospherePushConnection
also has a custom deserialization hook that always sets the internal state to DISCONNECTED
.
When a message needs to be sent to the browser, AtmospherePushConnection
results disconnected and moves itself into a PENDING
state, without delivering the contents.
The transition from PENDING
to CONNECTED
happens only during the initial connection, but the channel is effectively already active, so Flow client will not attempt to reconnect.
This problem may also arise with different session serialization approaches.