Tuesday, October 10, 2006

Info About java.sql.DriverManager.........


All java.sql.DriverManager calls are synchronized including the println method which is used by the SQLWarning and SQLException constructors.So any thread can block all other JDBC in the whole JVM.

So we should never call DriverManager.getConnection().

Instead..........

Driver driver =(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection connection = driver.connect("jdbc:weblogic:pool:POOLNAME",null);

0 Comments:

Post a Comment

<< Home