Hi Basically i want to check the database connections - opened in the java source code and forget to close in the code. If i have few java files i can check manually, if the number is more, i cannt check each and every file. Thats why i am looking for tool (plugin) to check any opened java database connections in the code.
There's no way to check statically. However you can set up to run for a while, monitor the network socket connections and if they begin to build up, take a profile snapshot and backtrace to see where the allocations were being made. Unfortunately, one of the best ways to leak connections is to not intercept exceptions and close the connection on the way back up the stack. Which is why I like the Spring Framework. It handles stuff like that.
Also, most of the ORM implementations afford some protection (or at least traceability) on things like this.
But that's small consolation when you inherit a lot of ugly old code done with brute-force JDBC.
Customer surveys are for companies who didn't pay proper attention to begin with.