Sunday, October 31, 2010

DB Connection class

DriverManager.getConnection (url, user, pwd).getClass().getName().equals("java.sql.Connection") = false

This is false because left hand side will return a class of the underlying database connection class i.e. oracle.jdbc.driver.OracleConnection in case of oracle. So this will be a instance of java.sql.Connection but can not be equal.

No comments:

Post a Comment