[hibernate-dev] A framework JDBC code change suggestion...

Stefan Fleiter stefan.fleiter at web.de
Thu Dec 14 04:13:24 EST 2006


Joseph Weinstein wrote:

 > In debugging a JDBC-related issue with hibernate and
 > WebLogic I found a file:
 >
 > org.springframework.jdbc.datasource.DriverManagerDataSource.
 >
 > There is a part of this file that hurts JDBC concurrency
 > in multithreaded applications like WebLogic, and I have a
 > solution. I would like to suggest a better alternative that
 > would probably be named DriverDataSource.
 >    The problem is that *all* java.sql.DriverManager calls are
 > class-synchronized.

Maybe it would help to read the documentation of the software you use:
Here comes part of the javadoc of DriverManagerDataSource:

/**
  * Simple implementation of the standard JDBC DataSource interface, configuring
  * a plain old JDBC Driver via bean properties, and returning a new Connection
  * for every <code>getConnection</code> call.
  *
  * <p><b>NOTE: This class is not an actual connection pool; it does not actually
  * pool Connections.</b> It just serves as simple replacement for a full-blown
  * connection pool, implementing the same standard interface, but creating new
  * Connections on every call.
  *
  * <p>Useful for test or standalone environments outside of a J2EE container,
..
*/

Greetings,
Stefan




More information about the hibernate-dev mailing list