aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Stop task from the queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Stop task from the queue " Watch "Stop task from the queue " New topic

Stop task from the queue

Michal Glowacki
Ranch Hand

Joined: Mar 14, 2006
Posts: 114

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,
I agree. Here's the link:
subject: Stop task from the queue
Similar Threads
JMS Queue problem
JMS Message Driven Bean
Updating rows in result set, should select for update be used?
I need to check for email in my J2EE app, please help??
Container behaviour for MDB with timers