getWorkpage().addLifecycleListener(new WorkpageDefaultLifecycleListener()
{
@Override
public void reactOnDestroyed()
{
if (m_thread != null)
m_thread.i_threadStop = true;
LongPollingMgr.remove(m_longPollingWebSocket);
}
});
this is called only when closing the application.
The event producing thread does not get affected if browser page is closed or refreshed. it keeps running.
How to deal with this ?
Update: The problem was, that i was lacking sessioncloser component in the jsp. It will call destroy() on the Dispatcher when the web page is refreshed or closed, which will call my reactOnDestroyed callback. It works on Workpage level and Outside level