Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 30723632B8A for ; Wed, 3 Mar 2010 06:10:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 83672-04 for ; Wed, 3 Mar 2010 10:10:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id DE020632A6A for ; Wed, 3 Mar 2010 06:10:13 -0400 (AST) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id o23A9suH038454; Wed, 3 Mar 2010 12:09:54 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id o23A9fcL038453; Wed, 3 Mar 2010 12:09:41 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-jdbc@postgresql.org Subject: Re: Very Dangerous bug in XA connection pooling and SL EJBs with jboss-4.2.3 & latest postgresql-8.4-701.jdbc3.jar Date: Wed, 3 Mar 2010 12:09:40 +0200 User-Agent: KMail/1.9.7 Cc: Heikki Linnakangas , jboss-user@lists.jboss.org References: <201003011731.15724.achill@matrix.gatewaynet.com> <201003031034.44077.achill@matrix.gatewaynet.com> <4B8E23DD.6040101@enterprisedb.com> In-Reply-To: <4B8E23DD.6040101@enterprisedb.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_lVjjLo3hK3jaYEu" Message-Id: <201003031209.41358.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/9 X-Sequence-Number: 20349 --Boundary-00=_lVjjLo3hK3jaYEu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =CE=A3=CF=84=CE=B9=CF=82 Wednesday 03 March 2010 10:54:53 =CE=BF/=CE=B7 Hei= kki Linnakangas =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Achilleas Mantzios wrote: > > i'll try to make a test case, but i think now there is enuf material fo= r anyone to make his own case, > > please ask whatever i may have missed, and thank you for your attention. >=20 > If you can set logLevel to DEBUG (ie. loglevel=3D2 in connection string), > run the code, and send over the logs, that would help a lot. From that > we should see what exactly is the sequence of XA commands the JDBC > driver is receiving from JBoss. >=20 As loglevel configuration property to org.postgresql.ds.common.BaseDataSour= ce is not supported in the lastest driver,=20 i made this patch (i attach it) against postgresql-jdbc-8.4-701.src, also i= set in jboss=20 pgsql true org.postgresql.xa.PGXADataSource localhost 5432 dynacom postgres xxxx 8.2 2 1 2 PostgreSQL 8.0 But i dont see anything spectacular comming out of PostgreSQL logs.=20 in postgresql.conf I have set=20 client_min_messages =3D debug5 log_min_messages =3D debug5 however playing with does not seem to change a thing. Am i missing something? > --=20 > Heikki Linnakangas > EnterpriseDB http://www.enterprisedb.com >=20 =2D-=20 Achilleas Mantzios --Boundary-00=_lVjjLo3hK3jaYEu Content-Type: text/x-diff; charset="utf-8"; name="loglevel.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="loglevel.patch" --- org/postgresql/ds/common/BaseDataSource.java.orig 2009-06-20 18:19:40.000000000 +0300 +++ org/postgresql/ds/common/BaseDataSource.java 2010-03-03 11:44:38.000000000 +0200 @@ -55,6 +55,7 @@ private String sslfactory; private boolean tcpKeepAlive = false; private String compatible; + private String loglevel; /** * Gets a connection to the PostgreSQL database. The database is identified by the @@ -168,6 +169,16 @@ this.compatible = compatible; } + public String getLoglevel() + { + return loglevel; + } + + public void setLoglevel(String compatible) + { + this.loglevel = loglevel; + } + /** * Gets the name of the PostgreSQL database, running on the server identified * by the serverName property. @@ -380,6 +391,9 @@ if (compatible != null) { sb.append("&compatible="+compatible); } + if (loglevel != null) { + sb.append("&loglevel="+loglevel); + } return sb.toString(); } @@ -425,6 +439,10 @@ { ref.add(new StringRefAddr("compatible", compatible)); } + if (loglevel != null) + { + ref.add(new StringRefAddr("loglevel", loglevel)); + } return ref; } @@ -444,6 +462,7 @@ out.writeObject(sslfactory); out.writeBoolean(tcpKeepAlive); out.writeObject(compatible); + out.writeObject(loglevel); } protected void readBaseObject(ObjectInputStream in) throws IOException, ClassNotFoundException @@ -461,6 +480,7 @@ sslfactory = (String)in.readObject(); tcpKeepAlive = in.readBoolean(); compatible = (String)in.readObject(); + loglevel = (String)in.readObject(); } } --Boundary-00=_lVjjLo3hK3jaYEu--