I'm working on the design of an with RAP/RWT, working under Tomcat. I'm learning RAP now, and a couple of questions come to my mind.
My application has a backend that works continuously gathering data from certain sources. On the other hand I want to create a frontend (RWT standalone application, or RAP with workbench functionality, not decided yet) running as a webapp.
First question: should I keep the backend as a separate process, and let the frontend RAP application communicate somehow with it? Or can I integrate everything together in the RAP application? Integrating everything together leads to the second question.
Second question: how can I detect from within the RAP application, when is the browser window/tab holding my app, closed? I would like to do some resource cleanup when the user closes the graphical interface (i.e. closes the browser). I cannot find anything equivalent to
ApplicationWorkbenchWindowAdvisor#preWindowShellClose
in RWT standalone applications. Same to dected when the application is started. In general, are there callbacks to follow the webapp lifecycle in RWT standalone applications?
Thanks a lot for your help!