Here is my scenario. I have a component which searches some records and while searching, those records are marked locked. I am using JSF-2 and primefaces. My MBean is ViewScoped. Now i have a requirement, while closing the browser, the lock on those records need to be released. I was searching and my best bet appears to be @PostDestroy. So can someone help, whether using PostDestroy is correct approach. Some of the threads on StackOverFlow suggest, PostDestroy doesn't get called on browser close events. I I am not able to find much on PostDestroy. Can someone provide pointers on this approach?
Thanks, Ben