aspose file tools*
The moose likes Java in General and the fly likes Using Quartz in web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using Quartz in web application" Watch "Using Quartz in web application" New topic
Author

Using Quartz in web application

Kumar Jaya
Ranch Hand

Joined: Jan 12, 2009
Posts: 45
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

Joined: Oct 13, 2005
Posts: 39409
    
  28
Moving thread as too difficult for "beginning".
David S Hansen
Ranch Hand

Joined: Mar 07, 2013
Posts: 30
Bounce. This post should re-live.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4749
    
    7

@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.


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Quartz in web application