rayman
rayman

Reputation: 21616

Schedule a task

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

Answers (4)

卢声远 Shengyuan Lu
卢声远 Shengyuan Lu

Reputation: 32014

Java EE API javax.ejb.TimedObject supports the feature.

Upvotes: 1

Dead Programmer
Dead Programmer

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

http://mhashem.wordpress.com/2010/03/29/java-quartz-scheduler-ejb-3-0-timer-service-and-java-timer-task-when-to-use-each/

Upvotes: 0

Luciano Fiandesio
Luciano Fiandesio

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

Jigar Joshi
Jigar Joshi

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

Related Questions