Using the class.forName method you get an instance of the Driver class used to handle the communication with the DB for example if you are using mySQL the com.mysql.jdbc.Driver class in the jdbc jar file is used, each Driver class should implement a bunch of interfaces specified by SUN some are mandatory while others are optional for example each Driver class should implement the following interfaces:
On the First note, dont post same question again and again. Please be patient till people reply.
Coming to your question. JDBC technology which is packaged along with JDK contains mostly interfaces ( Connection, Statement, Resultset) . This is done so ( infact to be done so) just to enable the independent database vendors to provide their own implementations.
what happens when we give class.forName(.....); (ie.) behind the scene.. who is the driver manager...
This is where it all starts. DriverManager is one of the classes( note : its a class) implemented in JDBC to load and understand the driver.Class.forName actually
1) Loads the class specified as part of "String parameter).
2) Registers with the Driver Manager. ( note : only driver class gets registered not ordinary classes , meaning the Database vendor Driver class has to be comply certain Driver manager rules.)
And, so when DriverManager.getConneciton is called , DriverManager checks for the loaded drivers and choose the one which is suited for the application. and there you go , get the connection , and store it Interface object Connection. And when you invoke Connection objects, its actually the runtime DB vendor specific implementation is claaed (remember polymorphism) .
vinoth ar, please be sure to take the time to compose descriptive subjects for your posts; read this for more information.
Using a title of "jdbc" in a forum completely dedicated to questions on JDBC isn't very helpful. This is the second topic you've started with this title. How are we to tell them apart? What if everyone named every topic in this forum "jdbc"?
Please go back and change your post to add a more meaningful subject by clicking the