Reputation: 21616
Iam using jboss5.1.x, EJB3.0
I need to schedule a task in my application. which way would you recommend me to do it according to version I am using below?
I heard about SAR, but i am not sure if there is a way which is more appropriate or updated to do it nowdays
thanks,
ray.
Upvotes: 0
Views: 435
Reputation: 12585
In Java you have TimerTask
, you can schedule a task to run at the particular time.But i would recommend Quartz
.According to your scenario , you have built in EJB Timer class available , hope will solve the purpose.
Please read this article
Upvotes: 0
Reputation: 10215
I also recommend using Quartz. In case you cannot use it, don't forget the EJB 3.0 standard has the concept of EJB Timer services. You can read more here.
Upvotes: 1
Reputation: 240996
I would recommend Quartz
Quartz is a full-featured, open source job scheduling service that can be integrated with, or used along side virtually any Java EE or Java SE application - from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components that may execute virtually anything you may program them to do. The Quartz Scheduler includes many enterprise-class features, such as JTA transactions and clustering.
Upvotes: 2