Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-963

NullPointerExceptions during JMS component initialization

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

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • incubation, 3.2
    • 3.1.2, 3.2
    • servicemix-jms
    • None
    • Windows XP, JDK 1.5.0_11

    • Patch Available

    Description

      Currently org.apache.servicemix.jms.AbstractJmsProcessor.start() starts JMS connection (and thus starts fetching messages on all already registered and all new registered listeners) before org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor initializes its pendingMessages map in doStart() method.

      It can be resolved by:

      1) moving initialization of MultiplexingConsumerProcessor.pendingMessages before consumer.setMessageListener(this); Also initializing MultiplexingConsumerProcessor.channel field should be done before any message arrives via listener's onMessage method.

      OR

      2) starting JMS connection in org.apache.servicemix.jms.AbstractJmsProcessor.start() after whole initialization in subclasses is done (after doStart())

      I am attaching patch for the first solution.

      Attachments

        Activity

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

          People

            gnodet Guillaume Nodet
            piotr.bzdyl Piotr Bzdyl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment