pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres jdbc transactions
3+ messages / 3 participants
[nested] [flat]

* Postgres jdbc transactions
@ 2011-09-05 14:36  Olivier Thomas <othomas@webtiss.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Olivier Thomas @ 2011-09-05 14:36 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

I am having a hard time to manage transactions with Postgres 8.3.

I am using latest Postgres jdbc driver and apached dbutils library.
After getting a connexion I am trying to set Connection objet to autocommit
"false" but I get an error message from DB saying that setting autocommit to
off is no longer supported.
Therefore, when I'm trying to call "rollcack" at the en d of my code, I am
rejected sayning that my DB is in autocommit true.
Can you tell me what I am doing wrong or which library I should use ?
so far I have found no example   on the web...

Thanks
O.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Postgres jdbc transactions
@ 2011-09-05 15:13  Guillaume Cottenceau <gc@mnc.ch>
  parent: Olivier Thomas <othomas@webtiss.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Guillaume Cottenceau @ 2011-09-05 15:13 UTC (permalink / raw)
  To: Olivier Thomas <othomas@webtiss.com>; +Cc: pgsql-jdbc

Show your code. I'm suspecting the same problem as
http://postgresql.1045698.n5.nabble.com/SET-AUTOCOMMIT-TO-OFF-no-longer-supported-td2169957.html
quoting the glorious Kris:

  Check your classpath.  I'd bet you've got two versions of the driver in
  there.  Try adding this line somewhere in your app.

  org.postgresql.util.PSQLDriverVersion.main(null);

  It will print where it finds the driver on stdout. 

(an old version of the driver biting you)


Olivier Thomas <othomas 'at' webtiss.com> writes:

> Hi,
>
> I am having a hard time to manage transactions with Postgres 8.3.
>
> I am using latest Postgres jdbc driver and apached dbutils library.
> After getting a connexion I am trying to set Connection objet to autocommit
> "false" but I get an error message from DB saying that setting autocommit to
> off is no longer supported.
> Therefore, when I'm trying to call "rollcack" at the en d of my code, I am
> rejected sayning that my DB is in autocommit true.
> Can you tell me what I am doing wrong or which library I should use ? 
> so far I have found no example   on the web...
>
> Thanks
> O.

-- 
Guillaume Cottenceau



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Postgres jdbc transactions
@ 2011-09-05 15:16  David Johnston <polobo@yahoo.com>
  parent: Olivier Thomas <othomas@webtiss.com>
  1 sibling, 0 replies; 3+ messages in thread

From: David Johnston @ 2011-09-05 15:16 UTC (permalink / raw)
  To: Olivier Thomas <othomas@webtiss.com>; +Cc: pgsql-jdbc


On Sep 5, 2011, at 10:36, Olivier Thomas <othomas@webtiss.com> wrote:

> Hi,
> 
> I am having a hard time to manage transactions with Postgres 8.3.
> 
> I am using latest Postgres jdbc driver and apached dbutils library.
> After getting a connexion I am trying to set Connection objet to autocommit "false" but I get an error message from DB saying that setting autocommit to off is no longer supported.
> Therefore, when I'm trying to call "rollcack" at the en d of my code, I am rejected sayning that my DB is in autocommit true.
> Can you tell me what I am doing wrong or which library I should use ? 
> so far I have found no example   on the web...
> 
> Thanks
> O.

It's hard to point out what you are doing wrong if you don't show exactly what you are doing (and the error message). A vague description doesn't cut it.

David J.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-09-05 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 14:36 Postgres jdbc transactions Olivier Thomas <othomas@webtiss.com>
2011-09-05 15:13 ` Guillaume Cottenceau <gc@mnc.ch>
2011-09-05 15:16 ` David Johnston <polobo@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox