Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5kgj-0008NB-Lu for pgsql-jdbc@arkaria.postgresql.org; Wed, 13 Feb 2013 22:20:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U5kgi-00087x-9J for pgsql-jdbc@arkaria.postgresql.org; Wed, 13 Feb 2013 22:20:24 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5kgc-00082X-Ef for pgsql-jdbc@postgresql.org; Wed, 13 Feb 2013 22:20:18 +0000 Received: from mail.polarislabs.com ([64.72.132.35] helo=plindyet01.polarislabs.lan) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5kga-0005op-4Y for pgsql-jdbc@postgresql.org; Wed, 13 Feb 2013 22:20:17 +0000 Received: from PLINDYCAS01.polarislabs.lan (192.168.25.34) by mail.polarislabs.com (192.168.25.33) with Microsoft SMTP Server (TLS) id 14.1.438.0; Wed, 13 Feb 2013 17:20:00 -0500 Received: from bvarner-desktop.polarislabs.lan (172.16.2.73) by PLINDYCAS01.polarislabs.lan (192.168.25.34) with Microsoft SMTP Server (TLS) id 14.1.438.0; Wed, 13 Feb 2013 17:20:12 -0500 Message-ID: <511C119E.8070409@polarislabs.com> Date: Wed, 13 Feb 2013 17:20:14 -0500 From: Bryan Varner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121215 Iceowl/1.0b1 Icedove/3.0.11 MIME-Version: 1.0 To: Kevin Grittner CC: Heikki Linnakangas , "pgsql-jdbc@postgresql.org" Subject: Re: PostgreSQL XAResource & GlassFish 3.1.2.2 References: <511A2C7F.1040104@vmware.com> <511A675B.3020207@polarislabs.com> <511A8BAC.7080400@vmware.com> , <511A8FC5.5040107@polarislabs.com> <511B8E0D.6010103@vmware.com> <511BAF49.8040706@polarislabs.com> <511BD390.30608@vmware.com> <1360787037.52062.YahooMailNeo@web162904.mail.bf1.yahoo.com> <511C05A8.7060001@polarislabs.com> <1360793146.49585.YahooMailNeo@web162902.mail.bf1.yahoo.com> In-Reply-To: <1360793146.49585.YahooMailNeo@web162902.mail.bf1.yahoo.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.2.73] X-Pg-Spam-Score: -0.2 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org >> Why would each XAConnection need it's own pool? > > Because one PostgreSQL connection can't interleave transactions, > and you can't commit or roll back a prepared transaction in a > connection which has a transaction open. I thought you wanted to > be able to do such things. They could be done if one XAConnection > could map to more than one PostgreSQL connection. Assuming that each logical XAConnection is backed by exactly one physical PGPooledConnection (and all connections are busy servicing an XID) then the situation you've described is completely accurate, and no different than the situation posed by the current XA implementation. Adding one physical connection to the data source, for use by the XAResource control signals (commit / rollback / recover / etc.) should be sufficient to avoid a deadlock in a client app. (you'd have to be able to queue the control statements and synchronously respond) I don't think you need a 'pool' per XAConnection, but you may need a number of extra physical connections in order to dispatch / handle non-xa invocations. Regards, -Bryan Varner -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc