Choosing The Right Version of JDBC Driver

When we select a JDBC Drivers... it is very often that the developers just assume a driver can be used, and just dump it inside /usr/java/jboss/server/default/lib/ . Some would forget to remove the default postgresql jdbc driver inside, resulting in 2 copies of the driver being loaded, and resulting in unpredictable behavior.. wihle some would put in the wrong versions.

As of the time of writing, we know that we are using JDK1.4.2_12, and from the table listed in the following page http://jdbc.postgresql.org/download.html, I would personally think that we should be using JDBC3.

I notice some of the JDBC drivers that we have at the production server currently is still on JDBC2 (which is meant for J2SDK 1.3).... for example... i spotted the following files being used at quite a few places:

pg74.216.jdbc2ee.jar

If we refer to the following table, the pg74.216.jdbc3.jar should be the preferred/right choice actually.

Sometimes, developers often take the easy way out, and always like to assume that everything else is correct, and this is the common cause for the developers to debug for something weird that is happening, until they pull their hair off, and staring at the computer screen for days and nights, just to debug something in their code, which is perfect, while the bug is simply caused by the wrong version of JDBC.