lunifera / lunifera-runtime-web

Web stuff for lunifera.org
Eclipse Public License 1.0
4 stars 4 forks source link

Data binding broken after session timeout #8

Closed riddy closed 9 years ago

riddy commented 9 years ago

After the vaadin UI has a session timeout, the reload of the page results in a broken data binding for the view components. It seems that it still tries to access the old UI object.

Caused by: com.vaadin.ui.UIDetachedException
    at com.vaadin.ui.UI.access(UI.java:1397)
    at org.lunifera.runtime.web.vaadin.databinding.VaadinObservables$UIRealm.asyncExec(VaadinObservables.java:1389)
    at org.lunifera.runtime.web.vaadin.databinding.VaadinObservables$UIRealm.exec(VaadinObservables.java:1371)
    at org.eclipse.core.internal.databinding.property.list.SimplePropertyObservableList$1.handleEvent(SimplePropertyObservableList.java:74)
    at org.eclipse.emf.databinding.internal.EMFPropertyListener$EMFListPropertyListener.notifyChanged(EMFPropertyListener.java:165)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
    at org.eclipse.emf.common.notify.impl.NotifyingListImpl.remove(NotifyingListImpl.java:725)
    at org.eclipse.emf.edit.command.RemoveCommand.doExecute(RemoveCommand.java:321)
    at org.eclipse.emf.edit.command.AbstractOverrideableCommand.execute(AbstractOverrideableCommand.java:125)
    at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
    ... 50 more
florianpirchner commented 9 years ago

Hi, in my opinion the exception is correct. Client timeouts should be handled by the application.

The application is responsible to do all the cleanup in case of timeouts.

You should call databindingContext.dispose() if an application (UI) is closed or a timeout occurs or even if parts of the UI are not required anymore.

Best Florian