Our application uses a pattern similar to ServiceActivator to call methods on session beans at the end of a jms queue. The methods are called via reflection and this works wonderfully for the normal case or if we have RunTimeExceptions any other than ApplicationDeadlockException.
If the reflection-invoked method throws an EJBException, the transaction is marked as rollbackonly (yes - we are using container-managed transactions). If the exception is caught or not does not matter - as the transaction is marked as rollbackonly, it rolls back and the message is redelivered 10 times before it is put on the DLQ - according to standard MDB configuration.
However, if we invoke a method that calls on a couple of entity beans that have already been reserved in the opposite order (in order to get a deadlock), we get an ApplicationDeadlockException. The transaction is marked rollbackonly like in the previous case, the same onMessage() is receiving the exception. - BUT THERE IS NO RETRY! Why???
Is this a bug in the standard jboss 4.0.2 installation with JBossMQ or are there other configuration settings than the bean specific ones we should look at?