Bug 401219 - Provide a hook for actions during startup/shutdown of application
Summary: Provide a hook for actions during startup/shutdown of application
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 347822 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-19 13:12 EST by Dominik Stadler CLA
Modified: 2014-03-19 15:13 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Stadler CLA 2013-02-19 13:12:21 EST
See discussion at http://stackoverflow.com/questions/14831926/how-can-i-pre-start-my-rap-application-to-trigger-warmup-right-after-startup/14857692#14857692, we have a RAP application which would benefit from pre-starting certain things when the RAP application is started to have a responsive application when also for the first user visiting the site.

So the use case for me is mostly pre-loading some content so that caches are filled up so that users do not have to wait a long time until the page loads for the first time.

We currently worked around this by making the initialization independend of the RAP/RWT application and starting it as part of the web-container startup (hosting RAP in a standalone Tomcat).
Comment 1 Ralf Sternberg CLA 2013-02-20 15:54:12 EST
I agree we should provide a listener for the ApplicationContext lifcycle. I'd suggest to call it ApplicationContextListener, similar to UISessionListener.

An instance could be registered in the ApplicationConfiguration.
Comment 2 Ralf Sternberg CLA 2013-05-23 06:20:30 EDT
*** Bug 347822 has been marked as a duplicate of this bug. ***
Comment 3 Ivan Furnadjiev CLA 2013-08-08 08:38:33 EDT
ApplicationContextListener#beforeDestroy has been added (see bug 370354).