why we use DriverManger.getConnection for getting Connection

Hi,

I have a small doubt in getting JDBC Connection. why we use DriverManager.getConnection for getting connection object, why dont we use parmeterConstructor of the driver class for getting Connection Object using that driver Object.

Can any please explain what is the reason behind getting Connection using DriverManager.getConnection.

Thanks,

Suman.ch

[386 byte] By [suman_tejaa] at [2007-11-27 6:41:51]
# 1
A connection may also be obtained with Connection conn = new oracle.jdbc.OracleDriver().defaultConnection();Method defaultConnection() has been deprecated.
dvohra09a at 2007-7-12 18:11:46 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Hi, Thanks, for the reply. anyway, why we need to follow the same old procedure to get a connection. What is the technical reson behind to the connection like this.
suman_tejaa at 2007-7-12 18:11:46 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
> anyway, why we need to follow the same old procedure to get a > connection.in jdbc 2.0, java introduce javax.sql.DataSource as a new ... (procedure maybe) to get connection.it is an interface, with primary method "getConnection()".
j_shadinataa at 2007-7-12 18:11:46 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...