Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EBF809FAE4E for ; Tue, 31 Oct 2006 11:51:45 -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 16971-02 for ; Tue, 31 Oct 2006 11:51:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by postgresql.org (Postfix) with ESMTP id 05B039FB29A for ; Tue, 31 Oct 2006 11:51:37 -0400 (AST) Received: by wr-out-0506.google.com with SMTP id 55so502317wri for ; Tue, 31 Oct 2006 07:51: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=Da72xJFsFxUMMgVh9sZxQegRVG/U6AGgGUwAyquKD61Vx+iG6u5IhZTeh0in1U5j64CeMxDO5r1ojNaI1cIHgSdF0khrfyc4Oyy7xTY6d9q+37f0p06Y6/LHYv6uHbhxQC+MixvhgHowYU6O9kZXs4S7+Fwm5oJfyYESjbqhXr0= Received: by 10.64.210.7 with SMTP id i7mr7027936qbg; Tue, 31 Oct 2006 07:51:36 -0800 (PST) Received: by 10.65.185.12 with HTTP; Tue, 31 Oct 2006 07:51:36 -0800 (PST) Message-ID: Date: Tue, 31 Oct 2006 16:51:36 +0100 From: "Ludovic Orban" To: "Heikki Linnakangas" Subject: Re: Postgres XA support Cc: "Kris Jurka" , pgsql-jdbc@postgresql.org In-Reply-To: <45474E22.50902@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <45297847.7060304@ejurka.com> <452A2CA0.2080900@enterprisedb.com> <452ABFFE.3000108@enterprisedb.com> <452BA80C.7060605@enterprisedb.com> <45474E22.50902@enterprisedb.com> X-Google-Sender-Auth: 09adfc88b603d222 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/156 X-Sequence-Number: 16039 Heikki, > > 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. > > The WebLogic manual isn't very helpful, this is all I found regarding > that parameter: > > "local-transaction-supported =97 Optional. Boolean. Set the > local-transaction-supported to true if the XA driver supports SQL with > no global transaction; otherwise, set it to false. The default value is > false." > > It doesn't actually say what difference it makes or why you would want > to set it to true. I don't see how a transaction manager could generally > make use of the feature, because it doesn't know if a transaction is > distributed or not until it's committed or the second resource is enliste= d. It's not the transaction manager but the connection pool (this is a parameter of the connection pool, not of the TM !) that is going to use this feature. If it detects you're using a connection outside a tm.begin() / tm.commit() block it will throw a SQLException. To achieve this you need tight integration between the connection pool and the TM but that's definitely possible. I think I should implement that as well. > > 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. > > That seems like the easiest solution. We'll have to wrap the Connection > object returned by PGXAConnection.getConnection so we can intercept > execute-calls, though. That sounds good enough. Cheers, Ludovic