Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Quartz in web application

 
Kumar Jaya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question in scheduling jobs in web application. If we have to schedule jobs in web application we can either use java util Timer/TimerTask or Quartz(there are also other scheduling mechanism, but I considered Quartz). I was considering which one to use, when i hit the site http://oreilly.com/pub/a/java/archive/quartz.html?page=1 which says using timer has a bad effect as it creates a thread that is out of containers control in the last line. The other pages discuss Quartz and its capabilities, but I can read that Quartz also uses thread and/or threadpool to schedule tasks. My guess is that these threads are also not under the containers control

Can anybody clarify this to me
Is it safe to use Quartz in my web applications without creating hanging threads or thread locking issues?
Thanks in advance
 
Campbell Ritchie
Sheriff
Pie
Posts: 49731
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving thread as too difficult for "beginning".
 
David S Hansen
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bounce. This post should re-live.
 
Junilu Lacar
Bartender
Posts: 7553
52
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@David, assuming you bounced this because you had the same question as the OP.

I have used Quartz in many web applications and have had no problems with it. If you are looking for something in the standard Java library, the java.util.concurrent.ExecutorService is another alternative. I have used the Spring Framework's TaskExecutor classes and they work well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic