Access CDI beans from BeanStep route handler for Quarkus extension #46564
Unanswered
jfbenckhuijsen
asked this question in
Q&A
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm currently working on a PR for the quarkus google cloud extension (ref: quarkiverse/quarkus-google-cloud-services#776 ) together with @loicmathieu .
What I want to achieve is register a specific endpoint (conditionally, if the config is enabled) to handle push messages. Given the docs at https://quarkus.io/guides/writing-extensions#extension-defined-endpoints I see I can register a custom handler which should be sufficient for what I want to achieve.
However, from the handler (the
MyCustomHandler
I need to access a CDI bean which is defined in the -runtime module of my extension (the CDI bean holds the various listeners for messages as registered by the user).What is the correct way to access CDI beans from that handler (which is not a CDI bean itself)? Just use
CDI.current().select(...)
or is there another way to achieve this?Beta Was this translation helpful? Give feedback.
All reactions