开发者

Invoking action when bean destroyed

开发者 https://www.devze.com 2023-03-08 17:36 出处:网络
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 \"destruc开发者_开发百科

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 "destruc开发者_开发百科tor" for JSF beans?


The @PreDestroy annotation is what you're looking for.

0

精彩评论

暂无评论...
验证码 换一张
取 消