commit and rollback don't throw exceptions when they should

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-jdbc(at)postgresql(dot)org>
Cc: <taktos(at)gmail(dot)com>
Subject: commit and rollback don't throw exceptions when they should
Date: 2009-10-20 19:44:49
Message-ID: 4ADDCCE1020000250002BBEA@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Based on this:

http://java.sun.com/javase/6/docs/api/java/sql/Connection.html#commit%28%29

Connection.commit() and Connetion.rollback() in the PostgreSQL JDBC
driver don't throw exceptions when they should. This was posted as
bug 5127 on the bugs list when it broke a user's connection pooling.
Are there any arguments that the PostgreSQL driver should not throw
and exception as stated on that javadoc page?:

- if a database access error occurs,
- this method is called while participating in a distributed
transaction,
- if this method is called on a closed connection or
- this Connection object is in auto-commit mode

I could take a shot at a patch if nobody disagrees with making this
change.

-Kevin

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2009-10-21 12:44:00 Re: commit and rollback don't throw exceptions when they should
Previous Message David Wall 2009-10-20 16:05:27 JDBC with PG 8.4 bytea character escaping wire protocol