Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stop task from the queue

 
Michal Glowacki
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have MDB where I start process of sending mails. I have a list of emails in file, and remove one after another. Now I'd like to add function of stopping this task. I've added a check of STATUS attribute in the file. So, when task will see that status is STOPPED should leave sending mails function. The problem is that message with request of stop (it invokes method that changes status in xml file) goes to end of the queue (which is quite logical...).

Could anybody give me a hint what to do? This is JBoss' MDB with Queue destination.

Thanks in advance,
Michal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic