Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Cool new feature: multiple tab support. How do I turn it off?
Cool new feature: multiple tab support. How do I turn it off? [message #1456853] Thu, 30 October 2014 20:01
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
I'm in the process of upgrading a RAP 1.5 application to 2.3

There is functionality requested by the client to automatically log off and save any changes in a users older session if they open a new one. This was being done by recording the HttpSession of the user when they log in, and if a previous session was found, invalidate it first.

This is causing a problem now, as if a user opens the application in another tab, the same HttpSession is being used and is now getting invalidated. This causes the application in both tabs to break.

So is there a way to go back to one UISession per HttpSession? I'm reluctant to remove or change the code that does this behavior, as it also does its best to clean up any deadlocks that may occur when a display is disposed - a problem we've suffered quite a bit in 1.3, 1.4 and 1.5. I don't have the resources to do large scale testing to pick out any deadlock issues in 2.3

Edit: I've just done some further testing. If a MessageDialog is opened while the workbench is shutting down, a deadlock still occurs.

The UIThread that had its HttpSession invalidated:
 UIThread [110e05e] 54 WAITING
 	at java.lang.Object.wait(Native Method)
 	at java.lang.Object.wait(
 	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.switchThread(
 	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.sleep(
 	at org.eclipse.swt.widgets.Display.sleep(
 	at org.eclipse.jface.window.Window.runEventLoop(
 	at xxxxxxxxxxxxxxxxxxxxxxxDialog.error(
 	at xxxxxxxxxxxxx.ApplicationWorkbenchWindowAdvisor$1.preShutdown(
 	at org.eclipse.ui.internal.Workbench$
 	at org.eclipse.ui.internal.JFaceUtil$
 	at org.eclipse.ui.internal.Workbench.firePreShutdown(
 	at org.eclipse.ui.internal.Workbench.busyClose(
 	at org.eclipse.ui.internal.Workbench.access$12(
 	at org.eclipse.ui.internal.Workbench$
 	at org.eclipse.swt.custom.BusyIndicator.showWhile(
 	at org.eclipse.ui.internal.Workbench.close(
 	at org.eclipse.ui.internal.Workbench.close(
 	at org.eclipse.ui.internal.Workbench$ShutdownHandler.handleEvent(
 	at org.eclipse.swt.widgets.EventTable.sendEvent(
 	at org.eclipse.swt.widgets.Display.sendEvent(
 	at org.eclipse.swt.widgets.Display.sendDisposeEvent(
 	at org.eclipse.swt.widgets.Display.release(
 	 - locked org.eclipse.rap.rwt.internal.util.SerializableLock@24268f
 	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.processShutdown(
 	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$

It's impossible for it to get out of this state now, since the HttpSession has been destroyed already. It's now nothing more than a memory leak at best. If it was invalidated by the application server's session reaper thread, that thread would be part of the deadlock too, resulting in no more session ever being timed out until the application server is restarted.

[Updated on: Thu, 30 October 2014 20:22]

Report message to a moderator

Previous Topic:Modified PDF won't refresh inside Brower control
Next Topic:PageBook on FormDialog
Goto Forum:

Current Time: Tue Feb 18 00:40:00 GMT 2020

Powered by FUDForum. Page generated in 0.04228 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top