Multiple Application needed Out of Sync problem

I found this topic
Multiple instances of the Application

where the answer is that “For each session there is one instance of your Application class.”
If that’s so, then that means that multiple Applications accesses windows from the same certain application?

I ask this because i get ‘Out of Sync’, but only if opening in different tabs of same browser, it doesn’t happend if one session is in IE7 and one in FF3.5 for instance.
One way to get rid of the Out of sync would probably be
, but it doesn’t solve the real problem, that i want separate application instances, with it’s own windows for each client.

The server message for Out of sync is:

The way i obtain Out of sync is:

  1. i open the appliation in two tabs
  2. i go into one and i modify a node (close or open), so it’s different from the other one
  3. i go back to the first and try any functionality of the tree, it goes Out of sync right away

The test is quite simple:

public class TestApplication extends Application {
	public void init() {
		Window mainWindow = new Window("Test Application");
		getMainWindow().getContent().addComponent(new TreeSingleSelectExample());

where TreeSingleSelectExample is the one provided with vaadin package, from the sampler.

What i want, is that each client gets served an instance of the application of his own at the servlet level if possible, or how would i make the init() look, to serve application instances?

I don’t believe this would happend if there were separate application instances. What is the real problem please?

EDIT: i use Vaadin 6.34

Ok, i talked with @zch_ in #vaadin, and this is the explanation for the tabbing behaviour:

and this means you do get a separate application instance, except if you open it in a tab of the same browser at least twice.

I’m going to override getWindow() and see if this solves it for now. Still this is prone to create a mess, especially if i use hibernate, user management system and so on. The topic about overriding getWindow is
and book talks about it

EDIT: Actually i don’t even want to override getWindow and get a new window, i want to refresh in such a case, in which case the Out of sync error message with the link to ‘re-sync’ is just what i need.