How to properly shutdown Eclipse RAP application? [message #505518] |
Thu, 31 December 2009 12:18  |
Eclipse User |
|
|
|
I have a RAP application which runs fine in both Internet Explorer and Firefox, but I need a functionality, when certain conditions reach, it needs to be shutdown completely.
As a placeholder, I invoke System.exit(1) for now to shutdown the entire JVM. This works fine on the server side, but the RAP client application displays the following dialog:
Message from webpage:
The server seems to be temporarily unavailable. Would you like to retry?
If I click OK, I get the same message again.
If I calick Cancel, then I get the following message in the browser window:
Request failed.
HTTP Status Code: 12029
Can someone suggest what is the right sequence to shutdown an RAP application (Including client sessions) cleanly?
Many thanks!
|
|
|
|
Re: How to properly shutdown Eclipse RAP application? [message #505579 is a reply to message #505561] |
Fri, 01 January 2010 17:38   |
Eclipse User |
|
|
|
I agree it is not very natural.
I was looking for ways to close client session cleanly so that it does not prompt the following message:
The server seems to be temporarily unavailable. Would you like to retry?
If I click OK, I get the same message again.
If I calick Cancel, then I get the following message in the browser window:
Request failed.
HTTP Status Code: 12029
As to the use case, it is displaying a few screens to collect user inputs and based on those inputs it performs certain actions. I provide a way to pass all inputs via Java property file, which works fine today, and am implementating a GUI version so we can provide more descriptive meaning to each property on the screen. We can choose to implement it as RCP application, but that will require X11 support on Unix/Linux platform, which is a pain to most customers, if I implement it as RAP, all we need is just the browser.
|
|
|
Re: How to properly shutdown Eclipse RAP application? [message #505973 is a reply to message #505579] |
Tue, 05 January 2010 11:47  |
Eclipse User |
|
|
|
Hi,
you must not call System.exit() because this will terminate the whole VM
with all running sessions being lost. If you want to have something like
a logout button that the user can click to terminate the current
session, maybe this posting helps:
http://www.eclipse.org/forums/index.php?t=msg&th=34206&a mp;start=0&
Regards,
Stefan.
erickingus@yahoo.com schrieb:
> I agree it is not very natural.
>
> I was looking for ways to close client session cleanly so that it does
> not prompt the following message:
>
> The server seems to be temporarily unavailable. Would you like to retry?
>
> If I click OK, I get the same message again.
> If I calick Cancel, then I get the following message in the browser window:
>
> Request failed.
>
> HTTP Status Code: 12029
>
> As to the use case, it is displaying a few screens to collect user
> inputs and based on those inputs it performs certain actions. I provide
> a way to pass all inputs via Java property file, which works fine today,
> and am implementating a GUI version so we can provide more descriptive
> meaning to each property on the screen. We can choose to implement it as
> RCP application, but that will require X11 support on Unix/Linux
> platform, which is a pain to most customers, if I implement it as RAP,
> all we need is just the browser.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04992 seconds