Vaadin close UI of another user

I’m doing a project in Vaadin 7. In that I need to implement something like below for the login.

A user ‘A’ is logged in to a system ‘1’. And again he logs into another system ‘2’. Now I want to know how to close the UI on the system ‘1’.

I tried something and can able to close the UI, If it is the same browser. But, for different systems/browser. I don’t have any idea.

My Code: private void closeUI(String attribute) { for (UI ui : getSession().getUIs()) { if(ui.getSession().getAttribute(attribute) != null) if(ui.getSession().getAttribute(attribute).equals(attribute)) ui.close(); } } Can anyone help me in this?

You have to keep track of the different sessions yourself, in some kind of a shared data structure - and be careful to properly synchronize all access to it. Servlet containers don’t give you direct access to other sessions; that would be a huge security risk.