I’m creating a web based application using Java Server Faces (JSF). I’m just wondering if a database connection is open and the user leaves the web page (close the browser), does JSF automatically closes this connection?
I’m creating a web based application using Java Server Faces (JSF). I’m just wondering
Share
You should close the database connection immediately after getting your data to send back to the client – BEFORE sending it back to the client. Best to do it in a
finallyblock. There is no real reason to keep it open but it does not only introduce a potential memory leak but also a great security risk.