Results 1 to 2 of 2

Thread: Expected transactional behaviour with no PlatformTransactionManager

  1. #1
    Join Date
    Aug 2005
    Location
    Halifax, NS, Canada
    Posts
    50

    Default Expected transactional behaviour with no PlatformTransactionManager

    Spring Framework 2.5.1

    What is the expected transactional behaviour of the DefaultMessageListenerContainer when the container is set sessionTransacted=true, but there is not transaction manager defined?

    I would have expected the session to have been committed if there were no unchecked exceptions thrown from the message listener, but that is not happening.

    The call stack eventually gets to line 485 in the AbstractPollingMessageListenerContainer, and that call to ConnectionFactoryUtils.isSessionTransactional(sess ion, getConnectionFactory()) returns false. This causes the commitIfNecessary (line 664 of AbstractMessageListenerContainer) to not call JmsUtils.commitIfNecessary(session).

    So it seems that in this setup with no transactionManager, but with sessionTransacted=true, there is never a commit called on the session.

    Is that the expected behaviour or a bug? I suspect it is a bug, personally.

    Thanks,
    -Don
    Don Laidlaw
    Infor Global Solutions

  2. #2
    Join Date
    May 2007
    Location
    Voorburg, Netherlands
    Posts
    1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •