This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Does the DriverManager use a HashMap or a HashTable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Does the DriverManager use a HashMap or a HashTable?" Watch "Does the DriverManager use a HashMap or a HashTable?" New topic
Author

Does the DriverManager use a HashMap or a HashTable?

Ashutosh Limaye
Ranch Hand

Joined: Oct 24, 2005
Posts: 58
I don't know whether my line of thinking is right or wrong...still

DirverManager stores all the drivers that are registered with it.

Now it must be using some Util.
The primary difference between the HashMap and HashTable is that one of them is thread safe...
So if they make DriverManager implement the non-threadsafe Util then it must be possible for different threads to access different drivers concurrently....
I know I'am sounding stupid....
P.S :p lease shut me up if you don't like what i post.

[ March 15, 2006: Message edited by: Ashutosh Limaye ]
[ March 15, 2006: Message edited by: Ashutosh Limaye ]
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
DriverManager uses a Vector.

And most all of the methods (registerDriver and getConnection for example) are synchronized.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does the DriverManager use a HashMap or a HashTable?
 
Similar Threads
Not loading the JDBC driver programatically
Custom multi-field array
adding a servlet
Package Problem...
Rangarajan Balasubramanian