5

I'm using Vaadin 7.1.2 and rely heavily on its push notification support. Everything works well for some time after the application starts, but then after about 30-40 minutes suddenly it stops pushing updates from the server and instead logs com.vaadin.ui.UIDetachedException on every update event. Restart helps but for very long.

All configuration parameters are default except I had to add the -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true command options for push to work.

I deploy to Tomcat 7.0.36 and everything is set to default in its configuration as well.

To update UI I simply call

ui.access(new Runnable{...});

on the UI instance which I pass down to every component from the UI.init() method.

Am I missing something?

4

1 回答 1

1

当应用程序空闲时(例如,您在应用程序中什么都不做)或无论用户是否处于活动状态,都会发生这种情况吗?可能是用户会话在客户端半小时不活动后被 Tomcat 无效,这就是您的 UI 分离的原因。如果不是这种情况,请考虑升级到最新的 Vaadin,现在是 7.1.8。最近解决了很多推送问题。

于 2013-11-19T14:06:21.897 回答