on 10-27-2009 5:59 PM
I have a web dynpro application that starts a TimerTask which causes the application to be run every 60 seconds. It works well but I want this TimerTask to start whenever the application is started.
I have added a <start-up mode="always"/> tag to the application-j2ee-engine.xml file for the application and it appears to start the application anytime the server is restarted as expected. However, the code to start the TimerTask isn't executed until the first time the application is ran. From then on, it works fine.
The code that initiates the TimerTask is in the Component Controller's wdDoInit method. But apparently this is not called at application startup, only the first time the application is loaded into a window.
Is there somewhere I should put code that I want executed each time an application is started? Any help would be appreciated.
Hi Tom,
I don't think Web Dynpro is the right tool for doing this. Web Dynpro is a programming model for user interfaces. I think you would need to build is a J2E(E)-application
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tom,
wdDoInit gets executed only once in the application's life time, If u need this to get executed every time the screen is loaded, then try writing the same code in the wdDoModifyView part of the view which is triggered every time a change is made on the screen.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, but I think I did not clearly state my issue. Having the code run only once on the very first load is perfect. My question was is there any way to get the code run as soon as the NWAS starts the application, and NOT only when the screen is loaded for the first time? I would like the TimerTask to get initiated everytime the server boots up, not requiring human intervention...
Thanks.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.