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

Come up with 'unique bean name' logic when components are defined inside the <chain> and register their own additional beans, e.g. 'JpaExecutor' in the 'RetrievingJpaOutboundGatewayParser'

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.2 M2
    • Fix Version/s: 2.2 M3 Sprint 3, 2.2 M3
    • Component/s: Core
    • Labels:

      Description

      Since handlers aren't registerd as beans when they are defined inside the <chain> there is an issue about registration some internal additional components as beans, whose beanId is based on result of AbstractBeanDefinitionParser#resolveId() with non-registered in the future current BeanDefinition.
      The main issue in the end, when we define several similar components (e.g. <jpa:retrieving-outbound-gateway>, <jpa:updating-outbound-gateway> etc.) and the one of them is inside the <chain> the last one overwrites registered before some additional bean at the same beanId.
      E.g:

      <chain>
           <jpa:retrieving-outbound-gateway/>
      </chain>
      
      <jpa:updating-outbound-gateway/>
      

      The first one doesn't register bean with id org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean#0.
      And after invocation of:

      final String gatewayId = this.resolveId(gatewayElement, jpaOutboundGatewayBuilder.getRawBeanDefinition(), parserContext);
      

      uses its result with suffix ".jpaExecutor" to register JpaExecutor bean.
      But the last one does the same with the same org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean#0 resolveId() result.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abilan Artem Bilan
              Reporter:
              abilan Artem Bilan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1d
                  1d
                  Remaining:
                  Time Spent - 0.5d Remaining Estimate - 0.5d
                  0.5d
                  Logged:
                  Time Spent - 0.5d Remaining Estimate - 0.5d
                  0.5d