wood burning stoves 2.0*
The moose likes JDBC and the fly likes On class.forname() in JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

On class.forname() in JDBC

par dhar
Greenhorn

Joined: Nov 16, 2006
Posts: 11
Hi All,

I have below questions on class.forname() statement in JDBC connecion

1. If we do like class.forname("com.a.b.c");class.forname("com.p.q.r");...
then will JVM load all classes or it will load only first one (or last one) and will ignore all others?

2. Also after using class.forname(("com.a.b.c"); we get connection as DriverManager.getConnection("jdbc:mysql:///test",user,pass) so then how exactly database url finds its corrosponding class which has been loaded using class.forname(). (if it uses reflextion, then can anybody pls tell me how it exactly works).

Regards
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Please do not post the same question multiple times. Let's continue the discussion in the duplicate thread, and close this one.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: On class.forname() in JDBC
 
Similar Threads
Class.forName
On class.forname() in JDBC
class.forName
about class.forName
Doubt on JDBC class.forname..