Rethink extension build time instantiation of DefaultCamelContext
- Dominant language
- Java
- Stars
- 302
- Forks
- 232
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 114
Description
There's a few places outside of the CQ core where extensions explicitly instantiate their own `DefaultCamelContext` so that they can use it to pre-load stuff or get access to Camel resources in order to do build time enhancements.
This feels a bit heavyweight and has some limitations:
* It slows down the build time code. Especially if you have all extensions that create `DefaultCamelContext` on the classpath.
* It spams the build time logs with `CamelContext` messages which is potentially confusing for folks.
* Occasionally we need to do special patches to fix issues (see #6642). The service discovery mechanism we have for `FastCamelContext` does not apply to `DefaultCamelContext`. So we loose the ability to easily exclude / include services etc.
Maybe there's a more lightweight way to do things or have 'just enough' `CamelConext` to fulfil whatever build time requirements these extensions have.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating extensions that explicitly instantiate DefaultCamelContext for build-time preloading or resource access. Review the FastCamelContext service-discovery mechanism and the special handling described in #6642. Done means build-time extensions have a lighter suitable context, avoid unnecessary CamelContext log messages, and retain the needed enhancement behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100