[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
react on the closing event of an webstart application  XML
Forum Index -> Development
Author Message
endroes

Active

Joined: 07/05/2008 11:07:29
Messages: 14
Offline

Is it possible to react on the closing event of an webstart application?

It would be possible to release server resources like http sessions, opened hibernate sessions (bound to a user session) etc.

At the moment (in our application) the user close the webstart application an resources would be releast after a server http sesion timeout (by a ServletListener). It would be nice if we can react on the closing event an release resources directly.
CaptainCasa

Power User
[Avatar]

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

Hi,

currently you can react - by adding the component SESSIONCLOSER - in the jsp/xml put a BEANPROCESSING tag on top level, below SESSIONCLOSER.

The SESSIONCLOSER sends an invalidation signal once the page containing the SESSIONCLOSER is removed - so put the SESSIONCLOSER on the outmost level of your pages! The session then is invalidated on server side, and corresponding events are passed to the application processing. (Please see chapte "Working with managed beans" in the Dev Guide).

WHAT YOU CANNOT DO currently: intervent, so that the user cannot close the application... - you only can react on what the user does.

We'll check how we can allow your application to intervent... (minimum being: popup warning the user that unchanged data will get lost)

Björn

Björn Müller, CaptainCasa GmbH
endroes

Active

Joined: 07/05/2008 11:07:29
Messages: 14
Offline

I have integrated the SESSIONCLOSER componend in our application. I found a chapter about Beanprocessing but no chapter about the component SESSIONCLOSER. It would be nice if you could provide a hint for this component in the documentation.

If i had closed the webstart application my own SessionListener was successfully invoked but the stack trace of the tomcat shows following:

@see attached file


 Filename Stacktrace.txt [Disk] Download
 Description
 Filesize 3 Kbytes
 Downloaded:  415 time(s)

CaptainCasa

Power User
[Avatar]

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

...OK, this is our central phase listener: this has no negative consequences at all - but of course the log output is not nice.

Will update so that "DOS-box is quiet" ;-)

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

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

...is part of next update (mo)... Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team