Announcement Announcement Module
No announcement yet.
Strange behavior of JmsTransactionManager Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange behavior of JmsTransactionManager

    Hi all,

    I have been testing the rollback of a transactional JMS producer and manually throw an exception from the method that declared transactional. I expected that if an exception is thrown, the message will *NOT* be sent to the queue. Here is my finding:

    1. If javax.jms.JMSException is thrown, the transaction is commited.
    2. If the javax.jms.JMSException is converted by convertJmsAccessException(e) first, the transaction is rollback!!

    Point 2 should be the expected behavior. Does it mean that JmsTransactionManager could only rollback runtime exception (to be specific, the exception thrown is org.springframework.jms.UncategorizedJmsException) . Any idea?

    Thanks for your time.