JBoss Community

MDB keep running after transaction timeout

created by Bob Kung in EJB3 - View the full discussion

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