Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS and Quartz  RSS feed

 
Arundhathi Menon
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How can I best integrate JMS with Quartz?

Quartz jobs are created to process bulky files / some process , at the scheduled hour.

JMS is used to queue up messages and process it one after the other.

My question in how can Quartz jobs be used in conjuction with JMS???

Thanks
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You schedule quartz jobs from your MDB (or the MessageListener) which processes the message from your jms queue/topic. Creating a new thread from an ejb is prohibited by the spec, but as long as you know how to control it (use a thread pool/concurrent package utilities in handwritten code or an async framework like commonj), my guess is that you should be ok.

You will have to certainly worry about message redelivery/compensating transactions etc in your jms/mdb implementations. The moment you create a new thread/schedule a job, the mdb returns with an acknowledgement to the server that the message delivery was succesful and the message is deletd from the queue/topic. Later when your job executes and runs into an exception, there is no way you can rely on the server to redeliver the message for retries (which would be have been possible if the processing was synchronous in the mdb)

ram.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!