[jboss-user] [EJB3] - MDB keep running after transaction timeout

Bob Kung do-not-reply at jboss.com
Tue Apr 3 00:49:31 EDT 2012

Bob Kung [https://community.jboss.org/people/r4_1314] created the discussion

"MDB keep running after transaction timeout"

To view the discussion, visit: https://community.jboss.org/message/727892#727892

Hi all,

I was doing a MDB timeout test
1) I have a stls(ABean) bean and a mdb (BBean).
2) set @ActivationConfigProperty(propertyName = "transactionTimeout", propertyValue = "10") to BBean
3) BBean will reply a message to a queue(replyQueue) at the end of onMessage(), if any exception throws, current message will fall to dlq.
4) ABean will sleep 20 seconds which will cause BBean timeout.
5) Redelivery Delay: 0, Max Delivery Attempts: 1
6) running on JBoss AS 7.1.0 final

Expect result is
Transaction timeout --> transaction rollback --> redelivery ---> transaction timeout again --->transaction rollback again ---> send message to dlq

Actual result is
Transaction timeout --> transaction rollback --> send message to dlq---> ABean and BBean keep running till ABean wake up  --> reply message to replyQueue -->  exception catch "The transaction is not active!".

Seems the timeout just only rollback the tx transaction, but will not terminal the running thread or trigger redelivery.

Is there something wrong I have? Please help!! Many thanks!

Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120403/6be77b21/attachment-0001.html 

More information about the jboss-user mailing list