I have a Bean that runs some threads with database connections. What can I do to make sure those connections are closed when the user navigates away? Can I define some form of "destructor" for JSF beans?
The @PreDestroy
annotation is what you're looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With