allthingssecurity opened a new pull request, #30982:
URL: https://github.com/apache/camel/pull/30982

   # Description
   
   [CAMEL-27610](https://issues.apache.org/jira/browse/CAMEL-27610)
   
   Fixes the one point of the ticket, found while the option descriptions of 
camel-spring were improved for CAMEL-23832 (#30946). I checked it against main 
first and it is real.
   
   1. **A spring-event component that SpringCamelContext did not create 
receives no events** (fixed). `SpringCamelContext.onApplicationEvent()` passed 
the events only to the `EventComponent` that `doBuild()` created, and 
`doBuild()` creates one only when no `spring-event` component is registered 
yet. A component added before the context was built, for example a hand-made 
`EventComponent`, was used for the endpoints, but its consumers started and 
never got an event. `onApplicationEvent()` now passes each event to the 
`spring-event` component that is registered, when it is an `EventComponent`, 
whether `doBuild()` created it or it was added before. The context no longer 
keeps its own field for the component it created. Nothing changes when the 
context creates the component, which is the usual case.
   
   Tests: `SpringCamelContextEventComponentTest` checks that a route from 
`spring-event:default` gets a Spring event when the component was added before 
the build (this test fails on main: the mock gets no message) and when the 
context created it. Both pass 5 runs in a row. The camel-spring unit tests 
pass: 7 run, 0 failures, 0 errors. I could not run the spring-event route tests 
of camel-spring-xml offline (its build needs the sources jar of 
camel-core-xml), so I leave them to CI.
   
   No generated file or doc change: the component metadata does not change.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it): 
[CAMEL-27610](https://issues.apache.org/jira/browse/CAMEL-27610).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
     (I built camel-spring and ran its unit tests. I did not run the full root 
build. No generated file changes.)
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
     This PR was prepared with Claude Code (Claude Opus 5.5). The commit 
carries a `Co-Authored-By` trailer.
   
   _Claude Code on behalf of allthingssecurity_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to