Schedule an EJB?

I have an EJB which takes input from JSP, and running stored procedure in the database. Because it will run for a long time, its better to run during some schedule hours.

After user submit a job from the JSP front, the Stateless Session EJB needs to "wait" until 2:00 AM before it runs the task. How can I do that? I don't want to use a loop since it will eat up all system computing resource.

Thanks

Kenny

[433 byte] By [sungana] at [2007-9-28 16:54:09]
# 1
There is a TimerBean in the new EJB specs.Regards,Mark Monster
mkamonstera at 2007-7-12 14:13:11 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
Alternatively, your Stateless Session Bean could call a Helper class that uses the Timer and TimerTask classes to schedule you task. Think its six of one and half a dozen of the other though.
sfaughnana at 2007-7-12 14:13:11 > top of Java-index,Other Topics,Patterns & OO Design...