Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scheduling jobs on application server.

 
Itamar Levi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

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)?

Itam
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic