If I open my vaadin application in two browsers, the application is loaded two times in the first browser and the second browser displays just a grey area.
The problem also occurs if someone else trys to open the application on a different computer (in a different network).
Does anybody know what the problem is?
As you can imagine my application is pretty worthless like that.
The normal singleton pattern is not by session nor by user, but shared by the whole virtual machine.
If you want to have something only for the user, put it in your application instance or elsewhere in the session (note that all Vaadin components in an application etc. are a part of the session). Alternatively, you could use the ThreadLocal pattern, but it looks like
the wiki page about it and Vaadin is a little outdated (there is a note at the beginning).
As Henri noted before the wiki article is outdated. Is there anywhere an updated
ThreadLocal pattern example? Or could you make a guess when the wiki article will be updated?
nice article. But in your examples you still implement
TransactionListener . The wiki on the other hand tells me to implement
HttpServletRequestListener instead:
Hi, sorry for the late reply, didn’t notice until now that this post got a reply. This exact same question has been asked in the blog post’s comments - take a look at them, I’ve shared my opinion there.