Call action when the bean is destroyed

I have a Bean that starts some threads with a database connection. What can I do to make sure that these connections are closed when the user moves? Can I define some form of "destructor" for JSF beans?

+4
source share
1 answer

@PreDestroy annotation is what you are looking for.

+7
source

All Articles