You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is of course not reliable at all because of the hard-coded delay.
Implementation ideas
We could fire a specific CDI event, or introduce a special interface to be implemented by beans (e.g. HttpServerListener) and called when the server is listening. I'm proposing a CDI-specific API because that's what Quarkus users are used to do.
The text was updated successfully, but these errors were encountered:
+1 for this. I'm pretty sure we've heard of similar requests in the past.
The one complication I can think of is that we would need to provide enough context so the users knows whether it's the HTTP or HTTPS server being started
The one complication I can think of is that we would need to provide enough context so the users knows whether it's the HTTP or HTTPS server being started
Yes, I was thinking of separate events/methods for HTTP and HTTPS...
mkouba
added a commit
to mkouba/quarkus
that referenced
this issue
Aug 8, 2024
Description
StartupEvent
/@Startup
does not help because the CDI event is fired before the HTTP server is started.The only workaround I can think of is to schedule a task in a
StartupEvent
/@Startup
to execute some logic with a delay, e.g. something like:and non-blocking variant:
This is of course not reliable at all because of the hard-coded delay.
Implementation ideas
We could fire a specific CDI event, or introduce a special interface to be implemented by beans (e.g.
HttpServerListener
) and called when the server is listening. I'm proposing a CDI-specific API because that's what Quarkus users are used to do.The text was updated successfully, but these errors were encountered: