******* ********<tivv00(at)gmail(dot)com> wrote:
> Looking at the code... Can it be because
> org.postgresql.jdbc2.AbstractJdbc2Statement#isClosed is not
> volatile? There is no synchronization and finalizer thread may
> simply not see statement was just closed by another thread.
That sounds likely enough to me. I don't know whether declaring the
flag volatile would be enough, but it needs either that or access
only through synchronized blocks.
In addition, I would recommend something like the attached to make
the code more bullet-proof.
In response to
pgsql-jdbc by date
|Next:||From: Bodor András||Date: 2012-02-13 17:03:44|
|Subject: Re: bug on to do list reproducable at version 9.0-801|
|Previous:||From: Віталій Тимчишин||Date: 2012-02-13 15:23:10|
|Subject: Re: non-trivial finalize() on AbstractJdbc2Statement|