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.
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)
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: