Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Complete
-
2.2 M2
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.