-
Bug
-
Resolution: Done
-
Major
-
5.10.1.Final
-
None
The LRA implementation needs to observe application shutdown in order to perform clean up activities. It achieves this using an ApplicationScoped bean. But when the destroyed event is fired a new bean may be created which is not what we want with an application scoped bean (this behaviour is seen when running as a Quarkus app). Annotating the method with `@PreDestroy` will ensure the correct application scoped bean used. So instead of
void disableRecovery(@Observes @Destroyed(ApplicationScoped.class) Object ignore)
use
@PreDestroy void disableRecovery()