Fix IntegrationFlowContext concurrency issue
When we register `IntegrationFlow` s concurrently at runtime, we may end up with the problem when we register the same object with the same bean name, but in different places. Or when we turn off bean overriding, we end up with the exception that bean with the name already registered * Wrap `IntegrationFlow` bean registration in the `StandardIntegrationFlowContext` into the `Lock` when its bean name is generating * Make `StandardIntegrationFlowContext.registry` as `ConcurrentHashMap` to avoid `ConcurrentModificationException` during `put()` and `remove()` * Fix concurrency for beans registration with the generation names in the `IntegrationFlowBeanPostProcessor` using an `IntegrationFlow` id as a prefix for uniqueness. **Cherry-pick to 5.0.x** Fix generated bean name in the WebFluxDslTests Use only single `Lock` in the `StandardIntegrationFlowContext`: we don't need a fully blown `LockRegistry` there anymore since we have only one synchronization block there and it is always around the same type * Add `What's New` note, and mention changes in the `dsl.adoc` Minor doc polishing.
This commit is contained in:
committed by
Gary Russell
parent
a750a7847c
commit
b21dc0dff3
@@ -101,7 +101,7 @@ public class WebFluxDslTests {
|
||||
@Qualifier("webFluxWithReplyPayloadToFlux.handler")
|
||||
private WebFluxRequestExecutingMessageHandler webFluxWithReplyPayloadToFlux;
|
||||
|
||||
@Resource(name = "org.springframework.integration.webflux.outbound.WebFluxRequestExecutingMessageHandler#1")
|
||||
@Resource(name = "httpReactiveProxyFlow.org.springframework.integration.webflux.outbound.WebFluxRequestExecutingMessageHandler#0")
|
||||
private WebFluxRequestExecutingMessageHandler httpReactiveProxyFlow;
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user