Improved error handling in JMS endpoint