More on 'Crap Code'

I read this blog recently and thought, “yes, that’s true”. I’ve seen a lot of code that has resource leaks because programmers don’t properly close database connections. This is one of the most compelling reasons to use something like Spring’s database classes – they remove the boilerplate code for you and make using JDBC just that little bit easier. If you don’t want to use Spring, then its not too difficult to write a couple of library methods that will close all database connections correctly.