Using events and observers is a great way of writing code in a reactive way without thinking too much about it, thanks to the great work done by the Jakarta Contexts and Dependency Injection(CDI) specification.
This recipe shows you how easy it is to use it to improve the user experience of your application.