File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes jdbc and Driver Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "jdbc and Driver Manager" Watch "jdbc and Driver Manager" New topic

jdbc and Driver Manager

Kevin Fonner

Joined: Sep 20, 2001
Posts: 21
I was reading that the java.sql.DriverManager provides basic services for managing JDBC drivers. However, I can also choose not to register the driver with the DriverManager and just make a direct connection.
What am I looking at here and how do I choose whether or not to use the Driver Manager.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I always use the DriverManager, but maybe that's because I didn't learn the other way of diong it.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
uma sakthi

Joined: Feb 02, 2001
Posts: 11
It is always good to register the drivers with the driver manager. This is a factory pattern. Good programming practice to always access the implementation( that is the driver) through a factory( that is the driver manager) . This results is low coupling
I agree. Here's the link:
subject: jdbc and Driver Manager
jQuery in Action, 3rd edition