Loading
Connection Leaks

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What are connection Leaks?


Ans)

An application(basically application server) is said to be leaking connection, if it acquires a connection and does not close it within specified time period. If this feature is enabled, the application server detects these potential connection leaks and dumps the leak tracing logs to server logs (you have to enable JDBC logs by using Admin console). Looking at the logs the user can figure out which application is leaking connection and fix the issues with application, if exists.

We can avoid these connection leaks by reviewing code with the help of logs and close all the connections properly as shown below.

try{ }catch (Exception e){
                                         e.printStackTrace();
                                  } finally {
                                        if (rs != null) {
                                                rs.close();
                                        }
                                        if (con != null) {
                                                con.close();
                                        }
                               }



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Connection Leaks


Connection Leaks

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free