how can i get the other instance of same vaadin application

Hi.
My use case is to push server changes to all running instances of my vaadin web app. I am using vaadin 6.8.12. as in vaadin 7 there come a server push mechanisam but for vaadin 6 i am trying to user pusher addon.
So when a data on db changed such as appointment status I need to show this status to all login users. so i need the instances of Application object of all logged in users. Can you help me to get this one.

Have a look at
this wiki article
.

private static final List listeners = new CopyOnWriteArrayList();

AS it is static list. IMO using static list is bad for a large web application. As Garbage collector will ignore the static references. am I correct?

As you can see they states
When we receive a broadcast message we need to use the access method as this call comes from a thread where the UI is not locked.

so they are accessing it in some safe method in vaadin 7. Also they have a detached method where they unregister. there is no such method in vaadin 6. Where should be called when session is timmed out or main application is going to be closed. So Question Remain.

What will be the thread safe way to communication between application instances in
VAADIN 6
?

Using a static variable in a big web application where it can be avoided is bad…but in this case it is actually fine as you need a list variable which reference an instance which is exactly the same on all connected server threads. So it’s ok in that case that the List will only be “destroyed” when the App/server shuts down.

Before you can do UI.access in Vaadin 7, in Vaadin 6 you used to do synchronize(MyApplication.class){//coding}
I don’t have a V6 project open right now so the syntax might vary a bit.

Yes there is no Application.detach() but there is a Application.close() method which you can override (although the close detection in V6 application is not that great).

The wiki article was made for Vaadin 7 so it needs some backwards migration to integrate it in your application.