[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
"Application is about to be closed"-Event  XML
Forum Index -> Development
Author Message
mwindisch



Joined: 13/11/2010 18:34:57
Messages: 3
Offline

Hi,

I'm looking for an event that informs me before the application is closed. I tried the IHttpSessionClosedReactor, but in this case I was informed only after the Dispatcher was destroyed. But I need the objects stored in the Dispatcher. Is where a way to be informed before the Dispatcher is destroyed?

Marcus
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

yes the SESSIONCLOSER is only a "reactive" event - as you describe.

There is an extra component for managing the close-process: CLIENTCLOSER. This informs you via actionListener taht the client wants to be closed. And then you close the client by a trigger from the server side.

This only works when running in Webstart mode - there is no pre-influence possibility when working in applet mode.

Please do not get confused: SESSIONCLOSER still is required - this is the one to clean up the server side session, whatever way it is closed.
CLIENTCLOSER is the one to put the closing into hte management of the application.

And also note: when using CLIENTCLOSER, you have to close the client by triggering the CLIENTCLOSER. The client (when in webstart) will never stop itself on its own... it's always going through your application.

Regards, Björn

Björn Müller, CaptainCasa GmbH
mwindisch



Joined: 13/11/2010 18:34:57
Messages: 3
Offline

Hi,

I found it and included the clientcloser into my JSP. By pressing the X-Button the defined action is executed, but after this the application is still open. Have I to do something to confirm that the application is allowed to be closed?

Marcus
Admin

Power User

Joined: 21/11/2007 11:36:10
Messages: 38
Offline

Hi,

you really HAVE TO trigger the closing. Otherwise the application will never close...

This is what I meant with "And also note: when using CLIENTCLOSER, you have to close the client by triggering the CLIENTCLOSER. The client (when in webstart) will never stop itself on its own... it's always going through your application."

This is very comparable to closing popups: the user presses the "X", but the closing is done through the application.

Regards, Björn
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team