[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2699?page=c...
]
Matt Solnit commented on HHH-2699:
----------------------------------
Okay, I'm convinced this is a non-issue. Neither C3P0 nor DBCP exhibit this behavior,
and I'm happy to use either one.
My apologies for the wasted bandwidth :-).
Workaround for bug in PostgreSQL JDBC driver
--------------------------------------------
Key: HHH-2699
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2699
Project: Hibernate3
Issue Type: Improvement
Affects Versions: 3.2.3
Environment: Hibernate 3.2.3, PostgreSQL 8.2.4 (Mac OS X), JDBC driver 8.2 Build
505 (JDBC 3)
Reporter: Matt Solnit
The following line (103) in
org/hibernate/connection/DriverManagerConnectionProvider.java:
if (isolation!=null) pooled.setTransactionIsolation( isolation.intValue() );
causes an exception when using the PostgreSQL JDBC driver, because it does not allow you
to change the transaction isolation level once a connection is in use. However, their
implementation does not handle the fact that the isolation level is really not being
changed in this case (because it is being set to the existing value).
The following change would work around this issue:
if ( isolation!=null &&
pooled.getTransactionIsolation()!=isolation.intValue() ) pooled.setTransactionIsolation(
isolation.intValue() );
P.S. I know the DriverManagerConnectionProvider is not for production use, but we use it
in development :-).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira