In a recent consulting gig, I was analysing a client's connection pool issue in a productive system, where during some peak loads, all the Java processes involving database interactions just started queueing up until nothing really worked anymore. No exceptions, though, and when the peak load was gone in the evening, everything returned back to … Continue reading How to Prevent JDBC Resource Leaks with JDBC and with jOOQ
Tag: Resource leak
A Subtle AutoCloseable Contract Change Between Java 7 and Java 8
A nice feature of the Java 7 try-with-resources statement and the AutoCloseable type that was introduced to work with this statement is the fact that static code analysis tools can detect resource leaks. For instance, Eclipse: When you have the above configuration and you try running the following program, you'll get three warnings: public static … Continue reading A Subtle AutoCloseable Contract Change Between Java 7 and Java 8