vaadin / vaadin/framework

UidlWriter().write() outside of VaadinServletService.requestStart and requestEnd

Open
#11,149 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

in com.vaadin.server.communication.AtmospherePushConnection the method push will call new UidlWriter().write(getUI(), writer, async); that in turn will call all the connectors and any beforeClientResponse

all this will happen on a new web socket connection (and thus still a normal HTTP request)

I'm using VaadinServletService.requestStart and VaadinServletService.requestEnd to initialize and destroy some connections, and the fact that some beforeClientResponse will be triggered outsinde of these is causing troubles.

Is it possible to call VaadinServletService.requestStart and VaadinServletService.requestEnd also around the websocket connection?

Vaadin version: 8.3.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading com.vaadin.server.communication.AtmospherePushConnection, especially push, and trace how VaadinServletService.requestStart and requestEnd are used for normal requests. Verify the websocket push path and its UidlWriter().write call. Done means the push-triggered connector updates and beforeClientResponse callbacks run within the expected request lifecycle.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.