Hi all, under heavy load, we have encountered a problem when writing messages using the JMS provider in a synchronous, transactional flow.
The problem is that in the code (lines 100 and up) producer.send(msg); exchange.setStatus(ExchangeStatus.DONE); channel.send(exchange); } finally { if (session != null) { session.close(); } if (connection != null) { connection.close(); } } it is possible that the DONE state would return to the originator faster than the session and the connection is closed in the finally section. If this happens, the originator (and therefore owner of the transaction) will first commit and after this the provider would close the connection. This results in a transaction exception. >From what we can tell, it should read like this: producer.send(msg); } finally { if (session != null) { session.close(); } if (connection != null) { connection.close(); } } exchange.setStatus(ExchangeStatus.DONE); channel.send(exchange); due to which we guarantee that the connection is safely closed before we send the confirmation back to the consumer. All of our load tests succeeded after this change. Best regards Martin Landua -- View this message in context: http://www.nabble.com/Transaction-Exception-due-to-ServiceMix-JMS-Provider-tf3964830s12049.html#a11252736 Sent from the ServiceMix - Dev mailing list archive at Nabble.com.