I'm currently writing a Java application which depends heavily on JDBC and connections to Oracle databases. Whenever I connect to a database, I close the connection in the finally block of my try-catch blocks to avoid connection leaks. This worked fine until now.
But now my program crashed for whatever reason. In PLSQL Developer I can still observe an open JDBC Thin client connection though. My question now is: how can I close a JDBC Connection, when I had to kill my application via task manager ?
Of course this crash shouldn't have happened in the first place, but it's still very unsatisfying that this has caused a connection leak and that I now would have to tell a DBA to kill the JDBC sessions manually, if too many Connections were still open.