UI Push and Logging out

Hi All,

Another post related to UI and Push functionality.
I am testing Push and what I noticed is that after logging out from the application
and logging back in, the Push code is throwing an exception:

Exception in thread “My Super Job” com.vaadin.ui.UIDetachedException
at uk.co.*****.updateJobStatus(JobsView.java:569)

What I do is in a view I have:

@Override
public void enter(ViewChangeEvent event) {
    ui = event.getNavigator().getUI();
}

and

private void updateJobStatus(RunnableJob runnableJob) {
   ui.access(new Runnable() {

      @Override
      public void run() {
         container.refresh();
      }
   });
}

Configuration used is:

Vaadin 7.5.6 with Push
Apache Shiro
Spring Boot

UI is annotated with @SpringUI and @Push.
View is annotated with @SpringView(name=“MyView”) and implements View

On logging out in UI class I have:

SecurityUtils.getSubject().logout();
getUI().getSession().close();
getPage().setLocation("/myapp/login");

I checked if on logging in back I have new instances of UI and the view and that is the case
so not sure what is happening ?

Thanks,
Adrian