Re: BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

Поиск
Список
Период
Сортировка
От taktos
Тема Re: BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed
Дата
Msg-id 4ADEAEC8.1040706@gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
> Is it possible that you have autoCommit set to true?

No, it is impossible as you know. Sample code I wrote is just a sample.
Actually I use a DI container (Seasar, it is a popular DI container in
Japan), and Seasar provides DBCP implementation.

 > This makes me concerned that fixing the bug in the JDBC driver could
 > expose serious bugs in application code, and break things which are
 > currently working, for some values of "working".  :-(

Indeed. But on the other hand, it is serious problem that PostgreSQL
doesn't behave like other JDBC drivers.

On a related note, JDK 6's JDBC is based on JDBC 4.0 spec.
I see JDK 5's, and I found a bit of difference to 6's.

http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#rollback()

| SQLException - if a database access error occurs or this Connection
| object is in auto-commit mode

There is no explicit spec about use of closed connection!
Because PostgreSQL's JDBC Driver is based on JDBC 3 specification, it
maybe that this is not a bug.

I'm still thinking that this is driver's bug. But if PostgreSQL team
decides that it's not a bug and won't fix, I accept the inevitable. And
I wait for a version compliant for JDBC 4.0.

Regards,
takiguchi

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Re: BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable"