if you want to use JDBC I suggest you to use JDBC class from shine enterprise pattern
it help you to set , the setting , it do all jobs for you
it's easier and faster than that old jdbc.
it has also soppurt hibernate
here is the library and document :