-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
@ShutDown as opposite to @Startup #35848
Comments
I am not opposed to this since we already have Shutdown - https://github.com/jakartaee/cdi/blob/master/api/src/main/java/jakarta/enterprise/event/Shutdown.java |
Hm, but we'll need a bit different semantics for |
- to mark a business method that should be executed during application shutdown - resolves quarkusio#35848
- to mark a business method that should be executed during application shutdown - resolves quarkusio#35848
@mkouba Cool, thank you very much 🙂👍 |
- to mark a business method that should be executed during application shutdown - resolves quarkusio#35848
- to mark a business method that should be executed during application shutdown - resolves quarkusio#35848
Description
With
@Startup
, I can register a method to be executed when the startup event is fired. The alternative is to@Observes
theStartupEvent
directly.For the shutdown event, I currently need to
@Observes ShutdownEvent env
. While it does work, I mostly don't have any use of the event object. This also leads to some code smells, as I have a unused parameter. (Usually marked by sonarcloud)Implementation ideas
Therefor it would be nice to have, similar to the startup event, a shotdown annotation
@ShutDown
which registers the method to theShutdownEvent
. This would be short handed and leads to cleaner code.The text was updated successfully, but these errors were encountered: