[jp@mobicomp.com: Re: Idle in Transaction] -- SOLUTION
От | Jim Downing |
---|---|
Тема | [jp@mobicomp.com: Re: Idle in Transaction] -- SOLUTION |
Дата | |
Msg-id | 20030106152548.GE30721@pling.qwghlm.org обсуждение исходный текст |
Список | pgsql-jdbc |
.setAutoCommit(true) solved the problem. I'll go and work out why the pooling mechanism didn't do this for me... Thanks to all for your suggestions, jim ----- Forwarded message from Jo?o Paulo Ribeiro <jp@mobicomp.com> ----- Envelope-to: jimdowning@qwghlm.org Delivery-date: Mon, 06 Jan 2003 10:43:19 +0000 Date: Mon, 06 Jan 2003 10:42:46 +0000 From: Jo?o Paulo Ribeiro <jp@mobicomp.com> To: jimdowning@pobox.com Subject: Re: [JDBC] Idle in Transaction Hi, Jim! As far as i know when you are using transactions and you do a commit your transaction is finished but a new one is created immediately. This new transaction will wait for you information to process and this is why the postgres porcess will appear as 'Idle in Transaction'. Im not a guru but as i had seen it seem to be a good ideia to reactivate de autocommit or do a reset to the connection just before you release it to the pool. Some pools do this automatically when you release a coonection but others do not. You have to check it by your self. If you do so de the postgres process will not appear as 'Idle in Transaction'. I hope i helped. Regards. Jo?o Paulo Ribeiro Jim Downing wrote: >Hi all, > >I have a problem whereby every time my java application tries to >commit a transaction a new postgresql process is spawned which is >marked 'Idle in Transaction'. Could anybody tell me what situations >(in the context of using the jdbc driver) these 'idle in transaction' >threads are created? > >I'm using a persistence framework (Hibernate as it happens), but >no-one else has had this problem with that framework, so I suspect >it's something to do with the way I have postgres configured, or else >my code (looking most likely atm). > >Regards, > >jim > >Jim Downing >Paribus > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > >http://archives.postgresql.org > > > > ----- End forwarded message -----
В списке pgsql-jdbc по дате отправления: