Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Check if Browser is closed
Check if Browser is closed [message #1073761] Thu, 25 July 2013 12:56 Go to next message
Stefan Milchram is currently offline Stefan MilchramFriend
Messages: 33
Registered: September 2012

Since RAP 2.1. the client sends a notification to the server to shut the session down:
This is a very nice feature, but in our case we would also need to know if the session was terminated this way:
When our users open for example a person record and edit it but do not save, then close the application via the x-button, our Workbench-pre shutdown listener fires and closes all open windows. If unsaved changes are present it displays a message if the users wants to save or discard, after that the person gets unlocked in the database. The users chooses and then the normal shutdown-procedure continues.
But when the user just closes the browser the pre-shutdown listener also fire and the message is displayed, but the client is not connected any more. So the thread waits and waits.
If we could determine that the browser was closed we could discard the changes automatically and unlock the person in the database.
We looked at the RAP-source code but did not find any reference to the last received message, also RWT.getRequest.getInputStream() does not work in this case.
Is there any way to do this?

Thanks in advance
Re: Check if Browser is closed [message #1074226 is a reply to message #1073761] Fri, 26 July 2013 10:12 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Stefan,

there is currently no way to distinguish whether a UISession has been
terminated by a browser close or a session timeout.

However, the UIThread being locked up in preShutdown sounds like a bug
in our workbench implementation, this case should be handled by the

Could you please open a bug report? We can then also use this bug to
search for a workaround for your application.


Ralf Sternberg

Twitter: @EclipseRAP

Professional services for RAP and RCP?
Previous Topic:RWT Standalone and EJB access
Next Topic:NoClassDefFoundError when adding AutoCompleteField
Goto Forum:

Current Time: Sun May 20 18:01:26 GMT 2018

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

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

Back to the top