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(Object.java:485)
 	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.switchThread(UIThread.java:62)
 	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLifeCycle.java:227)
 	at org.eclipse.swt.widgets.Display.sleep(Display.java:1253)
 	at org.eclipse.jface.window.Window.runEventLoop(Window.java:858)
 	at org.eclipse.jface.window.Window.open(Window.java:833)
 	at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:334)
 	at xxxxxxxxxxxxxxxxxxxxxxxDialog.open(SBDialog.java:80)
 	at xxxxxxxxxxxxxxxxxxxxxxxDialog.error(SBDialog.java:71)
 	at xxxxxxxxxxxxx.ApplicationWorkbenchWindowAdvisor$1.preShutdown(ApplicationWorkbenchWindowAdvisor.java:103)
 	at org.eclipse.ui.internal.Workbench$6.run(Workbench.java:945)
 	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:52)
 	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:177)
 	at org.eclipse.ui.internal.Workbench.firePreShutdown(Workbench.java:943)
 	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1081)
 	at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1071)
 	at org.eclipse.ui.internal.Workbench$21.run(Workbench.java:1337)
 	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
 	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1335)
 	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1297)
 	at org.eclipse.ui.internal.Workbench$ShutdownHandler.handleEvent(Workbench.java:387)
 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:658)
 	at org.eclipse.swt.widgets.Display.sendDisposeEvent(Display.java:748)
 	at org.eclipse.swt.widgets.Display.release(Display.java:731)
 	at org.eclipse.swt.graphics.Device.dispose(Device.java:276)
 	 - locked org.eclipse.rap.rwt.internal.util.SerializableLock@24268f
 	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.processShutdown(UIThread.java:170)
 	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:303)
 	at java.lang.Thread.run(Thread.java:662)
 	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:105)

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: Thu Apr 25 17:55:29 GMT 2024

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

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

Back to the top