This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DriverManager class

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I referred one URL http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/drivermanager.html#999674

In this, I read that DriverManager class handles establishing connection between a database and appropriate driver.
But what my intuition is, the connection is established between an application and database.

Correct me if I am wrong.
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the connection is established between an application and database
Indeed. But by using the DriverClass, and othe jdbc classes, as the connection mechanism.

Your application asks the DriverClass to connect to the database.
The DriverClass establishes the connection to the database.
Your application uses that connection.
 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic