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

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


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

"MDB keep running after transaction timeout "

To view the document, visit: https://community.jboss.org/docs/DOC-17845

--------------------------------------------------------------
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!
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-17845]

Create a new document in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120403/b2120d93/attachment.html 


More information about the jboss-user mailing list