I would strongly suggest you to use Connection pooling. Registering a driver, connecting to the database for every transacation is a very bad practice of coding. Creating new database connections is an expensive operation. The optimal technique is to make sure that database connections opened in one request are reused in subsequent requests.
Creating a statement object and ResultSet object and then closing them after every transaction is a must.
To know more about Connection pool and for example code, refer to this link: Connection Pooling
Hope this is useful..