File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Scheduling jobs on application server. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Scheduling jobs on application server." Watch "Scheduling jobs on application server." New topic

Scheduling jobs on application server.

Itamar Levi

Joined: Oct 27, 2012
Posts: 16

Working with application server it is Inadvisable to create threads (the threads should be created by the application server which manage them).

I would like to schedule task.

I familar with method of executing task on application server - using the jms.

my question is it there any other method, what about

Quartz sheduling - is it right to use it on application server (the quartz job/thread will be managed by the application server)?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
I've always thought that the guidance against creating threads within app servers was somewhat overdone. Tools like Quartz, or even just the java.util.Timer/TimerTask classes can be very handy to use.

BTW, I don't really understand why you mention JMS as a way of executing tasks - do you mean because you can send messages from outside the app server at specific times, and thus have the app server execute code? That would also be true for any kind of timed web service call (assuming that an HTTP server/service is available).

If you really want to avoid creating threads of your own, have the external trigger come from a cron job - it could launch an independent Java app that sends a JMS message or REST call to the app server.
I agree. Here's the link:
subject: Scheduling jobs on application server.
It's not a secret anymore!