[jboss-user] [Messaging, JMS & JBossMQ] - MDB and long time tasks
jc7442
do-not-reply at jboss.com
Mon Aug 6 10:59:55 EDT 2007
I have a MDB that listen on a queue. MDB is in charge to perform a time consuming tasks. It invokes another EJB session.
I have two problems:
- MDB is transaction required. My task exceed the default timeout. How can I configure by XML the timeout for the MDB ? I have try to add some stuff in jboss.xml, nut it looks to be ignored.
- Task is long, so MDB does not commit quick enough and the message is redelivered. I'd like to acknowledge the message at the beginning of my MDB as soon as I know that I will be able to process the message. I try message.acknowledge(). it looks to be ignored. Message is acknowlege only when onMessage method returns. Is it possible to programmatically acknowledge a message before MDB return ?
I have tried to move to a bean managed transaction. I start my own transaction and set the timeout on a UserTransaction. That's not a good solution because timeout is hardcoded in the bean. And I still have the redeliver problem.
Help will be appreciate
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071224#4071224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071224
More information about the jboss-user
mailing list