Commit b21dc0d
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.1 parent a750a78 commit b21dc0d
File tree
6 files changed
+160
-45
lines changed- spring-integration-core/src
- main/java/org/springframework/integration/dsl
- context
- test/java/org/springframework/integration/dsl/manualflow
- spring-integration-webflux/src/test/java/org/springframework/integration/webflux/dsl
- src/reference/asciidoc
6 files changed
+160
-45
lines changedLines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
139 | | - | |
140 | | - | |
| 137 | + | |
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
| |||
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
190 | | - | |
| 187 | + | |
| 188 | + | |
191 | 189 | | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
195 | | - | |
| 193 | + | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
| |||
238 | 236 | | |
239 | 237 | | |
240 | 238 | | |
241 | | - | |
| 239 | + | |
242 | 240 | | |
243 | 241 | | |
244 | 242 | | |
| |||
335 | 333 | | |
336 | 334 | | |
337 | 335 | | |
338 | | - | |
339 | | - | |
| 336 | + | |
| 337 | + | |
340 | 338 | | |
341 | 339 | | |
342 | | - | |
| 340 | + | |
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
346 | 344 | | |
347 | 345 | | |
348 | 346 | | |
349 | 347 | | |
350 | | - | |
| 348 | + | |
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
| |||
Lines changed: 40 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
82 | 99 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
87 | 104 | | |
88 | | - | |
89 | | - | |
| 105 | + | |
| 106 | + | |
90 | 107 | | |
91 | 108 | | |
92 | 109 | | |
| |||
133 | 150 | | |
134 | 151 | | |
135 | 152 | | |
136 | | - | |
| 153 | + | |
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
140 | 157 | | |
141 | | - | |
142 | | - | |
| 158 | + | |
143 | 159 | | |
144 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
145 | 169 | | |
146 | 170 | | |
147 | | - | |
148 | | - | |
| 171 | + | |
| 172 | + | |
149 | 173 | | |
150 | 174 | | |
151 | 175 | | |
| |||
0 commit comments