Replies: 3 comments 7 replies
-
Beta Was this translation helpful? Give feedback.
-
Hi @franck102, do you need to execute the
Yes, the
This should work just fine because the injected |
Beta Was this translation helpful? Give feedback.
-
I cannot use a RequestScoped bean in my OIDC TenantConfigResolver because the request context is not started yet when resolve() is called. So I am still putting the tenant on the RoutingContext there, then using this RequestScoped bean:
With that I can simplify the Vertx code to use whatever context is available. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I need to run some background tasks on startup and those tasks need to access request scoped beans and contextual data. My current approach kind of works, but I am pretty sure that there must be a better / simpler way to achieve this.
My background tasks are started like this:
and I have a tenant resolver that was initially written for HTTP requests, and which I modified to also check the Vertx context:
I am not very clear about the
@ActivateRequestContext
, what context instances will that allow me to use? Trying to use _routingContext.put() in startGateway fails, I guess the context is only created for HTTP requests?I tried using my own request scoped bean, but I don't know how to correctly access it from my tenant resolver:
I could definitely use some pointers about the correct design here!
Thanks,
Franck
Beta Was this translation helpful? Give feedback.
All reactions