Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5563

activemq-camel - Wrong default value in javadoc

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.11.0
    • 5.12.0
    • Camel
    • None

    Description

      In org.apache.activemq.camel.component.ActiveMQConfiguration

      We have default values

      private boolean useSingleConnection = false;
      private boolean usePooledConnection = true;

      And the javadoc says

          /**
           * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when
           * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather
           * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer
           * for each message then close them all down again.
           * <p/>
           * The default value is true so that a single connection is used by default.
           *
           * @param useSingleConnection
           */
          public void setUseSingleConnection(boolean useSingleConnection) {
              this.useSingleConnection = useSingleConnection;
          }
      
      
          /**
           * Enables or disables whether a PooledConnectionFactory will be used so that when
           * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather
           * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer
           * for each message then close them all down again.
           * <p/>
           * The default value is false by default as it requires an extra dependency on commons-pool.
           */
          public void setUsePooledConnection(boolean usePooledConnection) {
              this.usePooledConnection = usePooledConnection;
          }
      

      Notice the javadoc has wrong defaults. Its in fact pooled that is the default.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment