Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3267

Bug in org.springframework.integration.config.xml.AbstractPollingInboundChannelAdapterParser.doParse

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0 GA
    • Fix Version/s: None
    • Component/s: Build, Core
    • Labels:
      None

      Description

      When source does not have an id attribute, it will be generated:

      > String channelAdapterId = this.resolveId(element, (AbstractBeanDefinition) source, parserContext);

      and it will look something like org.springframework.integration.endpoint.MethodInvokingMessageSource#0

      then, this will be changed by appending ".source":

      > String sourceBeanName = channelAdapterId + ".source";

      and bean will be registered under that name and that name will be used to add property reference:

      > adapterBuilder.addPropertyReference("source", sourceBeanName);

      Next time when AbstractPollingInboundChannelAdapterParser.doParse will be invoked, ID generated will be the same since there is no bean named "org.springframework.integration.endpoint.MethodInvokingMessageSource#0" (but there is bean named "org.springframework.integration.endpoint.MethodInvokingMessageSource#0.source") and property reference added will be (again) "org.springframework.integration.endpoint.MethodInvokingMessageSource#0.source" instead of proper one.

      Suggested fix is to replace addPropertyReference with addPropertyValue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abilan Artem Bilan
                Reporter:
                cigaly Cedomir Igaly
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: