Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a build time optimized FastComponentNameResolver #2963

Merged
merged 1 commit into from Jul 30, 2021

Conversation

jamesnetherton
Copy link
Contributor

No description provided.

Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this prevent end users from adding their own components via service loader? For some reason, I do not see any invocation of ComponentNameResolver.resolveNames() in Camel or Camel Quarkus source tree to figure out myself.

@jamesnetherton
Copy link
Contributor Author

Does this prevent end users from adding their own components via service loader?

No, the components will still get registered. But I did realise something with the build time catalog that I wrote recently, in that doing discovery via these annotations may not work with old style components because it's a Camel 3 construct. Hence my question on Zulip about CamelServiceBuildItem.

@davsclaus
Copy link
Contributor

Yeah it looks like I added this API in 2020 for some use-case but we didn't need it anyway, so its not in use currently. However it can be used to find which components are available on the classpath in Camel if needed (maybe for logging, diagnose, jmx management etc.)

@jamesnetherton
Copy link
Contributor Author

it can be used to find which components are available on the classpath in Camel if needed

I was thinking of using it for something I have planned as part of #2914. But the DefaultComponentNameResolver doesn't actually work in native mode at the moment because the component service resources are not added to the native image (which circles back to my Zulip question). And is partly why I created this PR.

@ppalaga
Copy link
Contributor

ppalaga commented Jul 30, 2021

Thanks for the context, it is much clearer to me!

@jamesnetherton jamesnetherton merged commit 6ff9367 into apache:main Jul 30, 2021
@jamesnetherton jamesnetherton deleted the component-name-resolver branch July 30, 2021 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants