开发者

HornetQ MDB timeout

开发者 https://www.devze.com 2023-02-10 21:17 出处:网络
JBoss 5.1 with HornetQ I need a MDB to rollback if it cannot process a message in 30 s开发者_Go百科econds. Is this possible ?

JBoss 5.1 with HornetQ

I need a MDB to rollback if it cannot process a message in 30 s开发者_Go百科econds. Is this possible ?

The @TransactionTimeout(30000) annotation doesn't seem to work.

I use it along with:

@TransactionManagement(value = TransactionManagementType.CONTAINER) @TransactionAttribute(value = TransactionAttributeType.REQUIRED)

Current behavior is that if 5 minutes pass, JMS rolls back the transaction. However, this way the code is executed multiple times: for the first delivery and for each redelivery as JMS does know that the transactions has been canceled.

Could this be coped somehow ? Ideally I would like the MDB to rollback before JMS cancels the transaction.


try this

@ActivationConfigProperty(propertyName = "transactionTimeout", propertyValue = "30")
0

精彩评论

暂无评论...
验证码 换一张
取 消