HornetQ MDB timeout
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")
精彩评论