-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IntegrationMBeanExporter logic for endpoints
Related to https://stackoverflow.com/questions/72851234/error-in-startup-application-when-using-serviceactivator-in-spring-cloud-stream The `MessagingAnnotationPostProcessor` register an `endpoint` bean for Messaging Annotation on POJO methods. The `IntegrationMBeanExporter` post-process such a bean and registers respective MBean. It does this not in optimal way scanning all the `IntegrationConsumer` beans for requested `MessageHandler` which may cause a `BeanCurrentlyInCreationException`. * Rework the logic of the `IntegrationMBeanExporter.postProcessAbstractEndpoint()` to propagate provided endpoint for the monitor registration to bypass application context scanning for matched name. * Swap `equals()` for `monitor` since an `extractTarget()` may return `null` * Some other code clean in the `IntegrationMBeanExporter` * Change one of the `@ServiceActivator` in the configuration for the `ScatterGatherHandlerIntegrationTests` to POJO method. However, this didn't fail for me with original code unlike in the sample application provided in the mentioned SO thread. **Cherry-pick to `main`**
- Loading branch information
1 parent
733eb40
commit 4a55fa3
Showing
2 changed files
with
39 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters