How can I schedule an operation in a JSP/JavaBean environment ?

Serge Knystautas

A JSP or JavaBean lets you write any Java code so you can add Timers and TimerTasks anywhere in your code. These classes can't really be used as beans as they do not have the getter/setter methods, and I'm not sure how you would specify a block of code to execute. If you did write some code to wrap these classes as a JavaBean, you'd more than likely want to set it to an application scope so that only one instance of the timer exists in your system (otherwise you'll get a task running for each page request or session.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact