preWindowShellClose is not called [message #95815] |
Wed, 02 July 2008 13:39 |
Eclipse User |
|
|
|
Originally posted by: diman.tetracom.com
Hi All,
I am working on a RAP application and I want to do some cleanup when the
application (in the browser) is closed. I've overrided the method
preWindowShellClose in ApplicationWorkbenchWindowAdvisor (extends
WorkbenchWindowAdvisor) and set a breakpoint there.
However, the browser was closed, but the code in the method was not
executed.
Can you give me a hint how and when it is suitable to make the cleanup?
greetings
Diman
|
|
|
|
|
|
Re: preWindowShellClose is not called [message #95994 is a reply to message #95936] |
Wed, 02 July 2008 20:35 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi,
I share Dmitrys doubts, it is at least hard to achieve and likely to
not work reliably in all situations.
As this topic was raised before, please also see this newsgroup
(session, timeout, invalidate, free, memory, etc) for discussions
about ideas and thoughts on this.
Cheers
Rüdiger
stefan.hansel@tolina.de wrote:
>
> By the way - is it planned to have the browser send a last event when it
> is closed ?
>
> We usually have long running sessions and most user just don't care
> about closing the Shell but just close the browser.
> Then they restart the app because they forgot something and the memory
> consumptions increases unnecessarily.
>
>
|
|
|
|
Re: preWindowShellClose is not called [message #96232 is a reply to message #96217] |
Thu, 03 July 2008 09:05 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Stefan,
sorry to point you to nowhere. I cannot recall anymore where this
discussion happened, maybe on a bug or the mailing list.
Anyway, the keep-alive widget was discussed there and sounds like a
reasonable approach. Though I would consider this as an application
requirement and therefore should not be provided by RAP.
Note that implementing the keep-alive as a widget will likely cause
layouting issues. You might be better off using a similar approach
as the ExternalBrowser does. See also the 'custom widgets: life
cycle adapters and frequent client side activities' thread.
Cheers,
Rüdiger
stefan.hansel@tolina.de wrote:
>
> Searched a while but indeed found no suitable solution.
>
> Let's think a different way about those two competing requirements:
> - we want to have long (maybe even neverending) sessions ... users need
> to have time to get their coffee and beeing disturbed by long telephone
> calls and then go on working in the app
> - if the users kill their browser we want the session to die as soon as
> possible
>
> Wouldn't it be possible to write an invisible 'keep alive' widget - this
> just pings the server say every 10 minutes ?
> We could then configure the servers timeout to say 15minutes.
>
> Nevertheless - as long as the user keeps his browser window open, the
> session would not die at all.
> If he closes the browser or gets disconnected from the network server
> resources are not held too long.
>
> This could even be done as a feature of the shell, having an extra
> widget would just be a workaround.
|
|
|
|
Re: preWindowShellClose is not called [message #96456 is a reply to message #96384] |
Thu, 03 July 2008 13:31 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Stefan,
it should work this way. You're welcome to share your results here.
Cheers
Rüdiger
stefan.hansel@tolina.de wrote:
>
> Hhmm - sound's not tooo complicated:
>
> 1) writing and configuration a dummy-servlet (working as
> 'ping-destination'), so that I don't interfere with RAP
> 2) registering a PhaseListener that (once) sends a javascript to the
> browser, which regularly pings the dummy-servlet
>
> I'll give that a try in the near future.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04278 seconds