• Post Reply Bookmark Topic Watch Topic
  • New Topic

Register a driver

 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
When you register a driver what it means and what does actually happen?

Thanks
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'registering a driver' means you are making the DriverManager aware of the Driver class, so when you ask it for a Connection based on a JDBC URL, it can ask each of the URL's it knows about and ask them if they want to provide a connection.

This means you can have multiple Drivers registered at once, and they get to decide who returns a Comnnection based on that String.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!