I've tested 2 versions of jms transactions.
In first setup i use pure springframework with org.springframework.jms.connection.JmsTransactionManager
In second i use jencks config from
http://docs.codehaus.org/display/JCA/Message+Driven+POJOs + jencks transaction manager.
In both configurations i have producer and listener using the same queue.
In first configuratin when I throw exception inside onmessage() {} of the listener the message goes back to the queue it gets received again and this process repeats without the end.
In the second cofiguration after exception the loop of receiving the message putting it back to the queue happens only 3 times.
Can somebody explain to me how does it happen like this?