Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does the DriverManager use a HashMap or a HashTable?

 
Ashutosh Limaye
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DriverManager uses a Vector.

And most all of the methods (registerDriver and getConnection for example) are synchronized.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic