Spring Framework
  1. Spring Framework
  2. SPR-9200

Improve Javadocs for DMLC Regarding JmsTransactionManager

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: Waiting for Triage
    • Component/s: JMS
    • Labels:
      None

      Description

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Juergen Hoeller
            Reporter:
            Gary Russell
            Last updater:
            Chris Beams
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Days since last comment:
              2 years, 7 weeks, 1 day ago