Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Persistent scheduler  RSS feed

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I implement scheduler in J2EE server ? It should be able to survive
server restarts.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My preferred technique for job scheduling in J2EE is to use JMX Timers. I am actually in the middle of writing an article on this very subject. If you are interested I will PM you when I am done.
Alternately, you could use a third-party utility such as Quartz(open source) or Flux(commercial).
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris please do PM me.
Where can I get info on JMX timers. Will it survive server crashes?
Thanks
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found this link
http://www.theserverside.com/resources/articles/MonsonHaefel-Column4/article.html
[ August 14, 2003: Message edited by: Pradeep Bhat ]
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using a Wrapper Class around Java Timer.
This Wrapper class writes the timer info. to a database/file.
So everytime J2EE server/your java app starts, read from the database/file and invoke the timer class.
I have done this in one of our projects.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!