How can I manually activate and deactivate custom InjectableContext? #47416
Unanswered
skku-daniilkim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to implement a custom
@MyScoped
scope, which will allow me to keep track of such beans, if they are called inside the customwithMyScope( <lambda> )
. In Spring, I would typically just add two methods: activate and deactivate that will listen to some events via@Observes
, sinceContext
classes are discovered as beans, and then I will manually fire these events before and after running the provided lambda.However, Quarkus's
InjectableContext
does not catch events, as they seem to be build-time only https://stackoverflow.com/a/60725194. Is there an alternative way on how to achieve the same functionality in Quarkus?Edit: It seems that instead of InjectableContext, I should use ManagedContext.
Beta Was this translation helpful? Give feedback.
All reactions