|
loading the JDBC driver
|
|
02-05-2008, 10:16 PM
Post: #1
|
|||
|
|||
|
loading the JDBC driver
What is the difference between Class.forName("driverClass") and
DriverManager.registerDriver(new DriverClass()); ? |
|||
|
02-05-2008, 10:22 PM
Post: #2
|
|||
|
|||
|
RE: loading the JDBC driver
When we use the Class.forName the static block inside the driver would call the registerDriver method of DriverManager class and register itself.
When we use the DriverManager.registerDriver, the static block of the driver class would again executed and register the driver. But here the registerDriver would be invoked twice one from static block and one by explicit call of registerDriver method |
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help




