Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group