File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[EJB 3] MDB + Quartz vs EJB Timer

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What do people think about these 2 technologies :
EJB MDB + Quartz and EJB Timer.

What are the advantages/disadvantages of one compared to the other ?

If you need to implement a service that is scheduled to run at at specific times or time intervals, would you use EJB MDB and Quartz or EJB Timer only ?

Thanks for your feedback.
 
Sib Pete
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used Quartz in the past and I find that it works really well for my needs. I especially like the fact that I can use cron expressions to schedule tasks. Besides that, there are also other features that I can see as being very beneficial such as the JDBC store, where you can use a database to persist the scheduled tasks which helps in scaling, clustering, high availability, etc., a default Quartz Initializer Servlet which I can just use as is, easily configurable tasks via xml or properties and so on.

Granted, I havent worked with EJB timers, so I am really not sure what its pros and cons are and how it compares to the Quartz scheduler.

It took me a little while to figure out the whole Quartz scheduler api, configuration and how to get it up and running, but going through all the documentation and samples helped me to easily figure it out.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Celinio Fernandes wrote:
If you need to implement a service that is scheduled to run at at specific times or time intervals, would you use EJB MDB and Quartz or EJB Timer only ?



Remember, not all application servers support EJB MDB-Quartz integration. Hence it's not portable.
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks.

And how would you compare Quartz with the EJB Timers ?
In terms of scheduling, performance, etc
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic