I noticed that with Vaadin Fusion endpoints, there seems to be no VaadinSession available. Is this by design? Am I doing anything wrong?
I noticed that with Vaadin Fusion endpoints, there seems to be no VaadinSession available. Is this by design? Am I doing anything wrong?
You should not rely on a VaadinSession when using Fusion. There might or might not be one available today because of historical reason.
The VaadinSession mainly holds Flow UI instances for a given VaadinServlet/VaadinService. It requires locking before accessing, something you want to avoid with Fusion.
If you want to store values in the session, use the standard HTTPSession
Vaadin Fusion does not rely on VaadinSession. In versions prior to 22, a HttpSession is created although it is not used by Fusion. As of 22, Fusion can be completely stateless. You can read more about the upcoming stateless authentication here https://vaadin.com/docs/latest/fusion/security/spring-stateless