Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
More than one user for Vaadin OSGi on glassfish ?
First, i want to thank you for your great job on Vaadin.
I figure some difficulties on using Vaadin with OSGi on Glassfish. I've finished this great tutorial : Creating a Modular Vaadin Application with OSGi and i can test my application without problem.
Or, when i try with several user, actually two tabs in Chrome browser, the user that is the last connected has a working application and the first one looses the tabs therefore the modules (see the tutorial). So the application is empty of tabs for the first connected user. Nothing appears in the log except the creation of a new application one time for each user and after for each access (F5) only getApplicationClass method seems to be called. Actually, the last user wich has created the application can use it counter to the other one.
The same thing happens with two users on different computers. Could you please help me to understand my mistake ? Please don't hesitate to contact me with any queries. Thanks.
My code is the same of the tutorial.
If you are using two tabs in chrome (or any browser for that matter) you are in the very same session.
In fact, with chrome, two instances of chrome will be in the same session, with one exception: if you launch chrome normally, and then launch an incognito session (Ctrl-Maj-N -- "Navigation privée" inf French), then the second browser is a separate session.
Thanks for your answer, i was suspecting this fact on Chrome, that's why i ve tested on different computerss and on different browsers in the same computer (i hope chrome and ie don't share theirs sessions :*) ) and my problem still remains : only the last connected can surf on the application.
Somebody may have finished the tutorial and notice this matter ?
Ok, i'm not going mad (not yet...). I've just downloaded the sources from the tutorial and build its with ant and i can notice the same issue i've just described. So, i thing there is a trouble on session management in OSGi 4 architecture for Vaadin 6.2.6 on Glassfish V3 with Petter Holmström solution.
Any suggestions ?
You've found a bug in the tutorial code. I'm currently looking into it, although I think I know what the problem is already.
The tutorial has now been updated. The problem was that both applications shared the same module component instances. I have now updated the code so that each module creates new component instances for each application.
Please try it out and let me know if it solves your problem (it seems to be working on my computer).
It WORKS !!!! :grin:
Thanks a lot for your concern.
No problem! :-) And thank you for finding the bug!