Changing application locale makes changes to all users

In my application I set up the locale when the user get into the system to localize the components. Recently I was giving a demo and noticed that the language was switching from English to Dutch without apparent reason. It turned out that the demo server (hosted in a German server) was being accessed at the same time by another person that set it to Dutch and was affecting my English demo and viceversa.

I gave it a try on my machine with different browsers, using Chrome normal and incognito modes, etc to simulate different sessions and the issue is present. Any ideas on how to handle/fix this? I thought Vaadin already handled user sessions on its own but it seems that the application’s variables are shared?

Here’s what I do in my application to change the locale:


@Override
    public void setLocale(Locale locale) {
        super.setLocale(locale);
        xerb = ResourceBundle.getBundle("com.bluecubs.xinco.messages.XincoMessages", getLocale());
}

Then the xerb resource bundle is used to internationalize the UI. I tried not doing the super call but the result is the same, as if xerb was being modified by various sessions and shared among them.

Any ideas?

Is xerb by any chance static?

No, that was my first thought but it is not. I’m using Vaadin 6.7.3 if that’s important. 6.7.4 has a bug that makes my application restart all the time.