It looks like overriding JdbcTemplate might do the trick for me. I noticed that all JdbcTemplate operations call one of the following:
Each of them create a connection and execute the statments created.
execute CallableStatementCreator, CallableStatementCallback)
Either create a custom class which wraps each of these operations in a try/catch logic and reexecute the command when certain exceptions are thrown, or use Spring AOP to inject the proper code into the existing JdbcTemplate class.
What do people think?