Hello
I got problems in the following test case on a RAP 2.3.2 project.
Run the web application. Open a browser to load the page. At this moment there is only one UI session. On the page there is a test button. Click it to populate the progress monitor dialog. While the dialog window is opened, closed the browser so there is no UI session active, but the jetty server is still running.
Here is the code when test button is clicked (called by the selection adapter of the button):
private void handleTest() {
ProgressMonitorDialog dialog = new ProgressMonitorDialog(null);
try {
IRunnableWithProgress rp = new IRunnableWithProgress(){
@Override
public void run(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
Thread.sleep(8000);
}
};
dialog.run(true, true, rp);
}
catch (Exception e) {
e.printStackTrace();
}
}
This method is in the entry point class of the application. When the progress dialog is opened, if I closed the browser, I got the following exceptions
java.lang.NullPointerException
at org.eclipse.rap.rwt.internal.serverpush.ServerPushManager.isSessionExpired(ServerPushManager.java:192)
at org.eclipse.rap.rwt.internal.serverpush.ServerPushManager.isSessionExpired(ServerPushManager.java:187)
at org.eclipse.rap.rwt.internal.serverpush.ServerPushManager.canReleaseBlockedRequest(ServerPushManager.java:156)
at org.eclipse.rap.rwt.internal.serverpush.ServerPushManager.processRequest(ServerPushManager.java:140)
at org.eclipse.rap.rwt.internal.serverpush.ServerPushServiceHandler.service(ServerPushServiceHandler.java:30)
at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:126)
at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:110)
at org.eclipse.rap.rwt.engine.RWTServlet.doGet(RWTServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper.service(CutOffContextPathWrapper.java:106)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
...... // ignored the remaining stack trace
Exception in thread "ModalContext" org.eclipse.swt.SWTException: Device is disposed
at org.eclipse.swt.SWT.error(SWT.java:3645)
at org.eclipse.swt.SWT.error(SWT.java:3568)
at org.eclipse.swt.SWT.error(SWT.java:3539)
at org.eclipse.swt.widgets.Display.error(Display.java:2304)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:1088)
at org.eclipse.jface.operation.ModalContext$ModalContextThread$1.run(ModalContext.java:154)
at org.eclipse.rap.rwt.internal.lifecycle.ContextUtil.runNonUIThreadWithFakeContext(ContextUtil.java:67)
at org.eclipse.rap.rwt.internal.service.UISessionImpl.exec(UISessionImpl.java:233)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
How can I kill the running process after the UI session is exited? Thanks