Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9200

Improve Javadocs for DMLC Regarding JmsTransactionManager


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.1 RC1
    • Component/s: JMS
    • Labels:


      A number of errors have crept into the DMLC Javadocs.

      For example:

      • setCachLevel() says that while the default is CACHE_NONE with an external txManager, it can be overridden. This is not the case because a new connection is obtained for each poll and bound to the thread.
      • setTransactionManager refers to AMLC class Javadocs, which in turn imply that for downstream JmsTemplate within an @Transacted method needs the LC to have an external JmsTransactionManager.
      "* The effect is similar to "sessionTransacted" set
       * to "true", the difference being that this external transaction management
       * will also affect independent JMS access code within the service layer
       * (e.g. based on {@link org.springframework.jms.core.JmsTemplate} or
       * {@link org.springframework.jms.connection.TransactionAwareConnectionFactoryProxy}),
       * not just direct JMS Session usage in a {@link SessionAwareMessageListener}."

      In fact, even with sessionTransacted=true the session is bound to the thread via a LocallyExposedJmsResourceHolder and no external txManager is required and, if provided, precludes caching in the DMLC (CCF is needed).

      It is now generally recommended that an external txManager only be provided if JTA is needed.

      Suggest a thorough review of all Listener Container documentation regarding the use of JmsTransactionManager.


          Issue Links



              • Assignee:
                snicoll Stéphane Nicoll
                grussell Gary Russell
                Last updater:
                Stéphane Nicoll
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created:
                  Days since last comment:
                  3 years, 47 weeks, 3 days ago