Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 932359FA12B for ; Tue, 31 Oct 2006 06:24:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 23443-02 for ; Tue, 31 Oct 2006 06:24:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.200]) by postgresql.org (Postfix) with ESMTP id D24589FA5B5 for ; Tue, 31 Oct 2006 06:24:37 -0400 (AST) Received: by nz-out-0102.google.com with SMTP id i11so1523140nzi for ; Tue, 31 Oct 2006 02:24:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=YIO3dox/k1fmdEkEPdQwkmD04MLIBdpMiNnWq/6zMbak0R+yNVNX5AjtCj7p5nxaG7BUiA4Aziw+zS9VTnc+NAh4TsL08T/GQ9+05uohtp4zkm9AiV+uCJc3tBSozxloYdv6XaSfbbandowJDXAb0weDVpdEkw0t8aAD8pdXg9Y= Received: by 10.65.38.13 with SMTP id q13mr6518294qbj; Tue, 31 Oct 2006 02:24:36 -0800 (PST) Received: by 10.65.185.12 with HTTP; Tue, 31 Oct 2006 02:24:36 -0800 (PST) Message-ID: Date: Tue, 31 Oct 2006 11:24:36 +0100 From: "Ludovic Orban" To: "Kris Jurka" Subject: Re: Postgres XA support Cc: "Heikki Linnakangas" , pgsql-jdbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45288F3C.1030906@ejurka.com> <45297847.7060304@ejurka.com> <452A2CA0.2080900@enterprisedb.com> <452ABFFE.3000108@enterprisedb.com> <452BA80C.7060605@enterprisedb.com> X-Google-Sender-Auth: 7d8c1de63a2076c4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/155 X-Sequence-Number: 16038 Kris, 2006/10/30, Kris Jurka : > > I see how Allan's patch would get UPDATE 1 to commit, but UPDATE 2 and 3 > are the equivalent of an interleaved transaction and I don't see how that > could possibly work. I'm not sure what sort of protection we need to add > to prevent people from doing this or other transaction handling actions on > the connection. Right now the Connection object doesn't know if it is > being used by a XADatasource. The problem is not if a connection was created by an XADatasource or not but if it is being used in a global transaction context or not. Weblogic's connection pool has a parameter called local-transaction-supported which when set to false will disallow local transactions to be executed on connections taken from that pool. I guess you could enforce the same behavior in the driver by throwing a SQLException when some query is executed and XAResource.start() has not been called yet or XAResource.end() has already been called. Ludovic