[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2699) Workaround for bug in PostgreSQL JDBC driver

Matt Solnit (JIRA) noreply at atlassian.com
Fri Jun 29 18:13:52 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27360 ] 

Matt Solnit commented on HHH-2699:
----------------------------------

Actually, I am now having second thoughts about this request.  The reasons:
1) getTransactionIsolation() in the PostgreSQL driver results in a round-trip to the server.
2) The C3P0 and Proxool connection providers seem to do the same thing as DriverManagerConnectionProvider.

Not sure...

> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list