Originally by
It seems that using one VaadinSession that is shared between all VaadinService instances causes more problems than what it fixes.
We should go back to the Vaadin 6 way of having one storage object for each defined servlet by: 1. Change the logic for how the VaadinSession is stored in HttpSession so that there is one instance per VaadinService by using VaadinService.getServiceName() in the attribute name. 1. Remove the now unnecessary VaadinSession parameter from some methods in e.g. VaadinService. 1. Rename VaadinSession to VaadinServiceSession to better tell what it is related to.
The only identified use case that gets "broken" by this change is if there are two servlets with different UI classes (e.g. / with UserUI and /admin with AdminUI) that should still share data. This can still be achieved either by using only one servlet and a UIProvider for serving different UIs for different paths or by storing the global data e.g. in HttpSession instead of in VaadinSession.
该提问来源于开源项目:vaadin/framework