check1check1
check1check1

Reputation: 21

HornetQ MDB timeout

JBoss 5.1 with HornetQ

I need a MDB to rollback if it cannot process a message in 30 seconds. 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.

Upvotes: 2

Views: 1373

Answers (1)

Günter Gartner
Günter Gartner

Reputation: 21

try this

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

Upvotes: 2

Related Questions