Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9DFA39FB966 for ; Wed, 25 Jul 2007 12:02:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 40674-05 for ; Wed, 25 Jul 2007 12:02:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id 488809FB5C6 for ; Wed, 25 Jul 2007 12:02:23 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so393422ugf for ; Wed, 25 Jul 2007 08:02:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Civ6G9U2e+ZalJLi4GV91rgQFE1eJcYjrTImG0W3DFU7NQLrhzNtjJ7KT8f7Qz0COvgnmTLWPtqAIuy4wJvrwiRb3ok/5wlmsYMRe6R/TYs4/HqVR0wDl51nX7jiF3oJbs34jC83GVDLzqAOa9Wx8ECsm0lInhGcn5VuaSvfGIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Lb6PbW294xrvpdod1v1wdBQ1EjNwPPvvld2fAZLQdlrgeDMkdFaWIaTCdyaOGPBDSw/TP2mv7tJJYkjNdbbxk/LtYry36qWSMFkVwBcH80Vj3dsO3EgpScmEUIKY+hyT+Y78ftRKoLpFHc18tBK3mnTsfXsZSJZmKNmyZDaCTM8= Received: by 10.78.107.8 with SMTP id f8mr191722huc.1185375741685; Wed, 25 Jul 2007 08:02:21 -0700 (PDT) Received: by 10.78.189.6 with HTTP; Wed, 25 Jul 2007 08:02:21 -0700 (PDT) Message-ID: <198625570707250802k5a325718ic805df8201ba020b@mail.gmail.com> Date: Wed, 25 Jul 2007 11:02:21 -0400 From: "Douglas Hammond" To: pgsql-jdbc@postgresql.org Subject: defaultAutoCommit problem with glassfish MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/116 X-Sequence-Number: 17290 I have been trying to setup a dataSource in glassfish that needs to have the defaultAutoCommit = false using org.postgresql.ds.PGConnectionPoolDataSource. I am using the postgresql-jdbc-8.3dev-600 driver. It does not work for me. It seams that glassfish is relying on the driver to set and retain the defaultAutoCommit state. I do not know if the driver should retian this or the pool manager should. Here is what I have done to find that the postgres jdbc driver does not retain the defaultAutoCommit state for new connections. At least I think this is what is happening. Since you can't use org.postgresql.ds.PGConnectionPoolDataSource directly This is what I did. This does NOT work I thought I would try I moved the defaultAutoCommit into the org.apache.commons.dbcp.datasources.SharedPoolDataSource. It WORKS. It looks like postgresql jdbc driver is relying on the pool manager to set or keep the autoCommit state. I do not know if this is proper behavier or not. Should this be submitted as a bug?