Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8AD439F9272 for ; Tue, 30 Oct 2007 13:23:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 33845-02 for ; Tue, 30 Oct 2007 13:22:48 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by postgresql.org (Postfix) with ESMTP id AA3889F94F5 for ; Tue, 30 Oct 2007 13:22:46 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id b27so2072780fka for ; Tue, 30 Oct 2007 09:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=ofj38z+VqENLUquSd32SWOlu9td3m0g8/R6GOKMGU9A=; b=YO8idr+MenplNlBnTk/LM1NeO3uBdyoBNZawXEWnkZ/JFM5vcRHIm4aI2Cn7s9i5Gkm8pWexkiVBuXtF2Dx68aRkiX80R1FXrtRzYTdTyL8P2/SBxEaZZzd17ZAGC0cnz9n0CWwRIiPGASRPdva2VxLzHThfeVvgUFEKxrnDkNM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=mXUmaKoQfN1o9Tr+GH7PG16ZUCWKY5O5nJa+wW0zkUL5bfP30nKZiRtGOPDfI0DtFKCAb14+VlATzW1K5xCqgi/1T+DHEFFY4BE/vBsiyKJqGXvpI1UwU5MNfoPaI6RYcK9qZJ/OP4Lh1cZxMl6/953eEeVThrpLWmi58+5b/Co= Received: by 10.82.190.2 with SMTP id n2mr14268346buf.1193761365148; Tue, 30 Oct 2007 09:22:45 -0700 (PDT) Received: from ?192.168.1.33? ( [86.31.109.99]) by mx.google.com with ESMTPS id h7sm402750nfh.2007.10.30.09.22.42 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Oct 2007 09:22:43 -0700 (PDT) Message-ID: <47275A50.2050201@enterprisedb.com> Date: Tue, 30 Oct 2007 16:22:40 +0000 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.12 (X11/20070730) MIME-Version: 1.0 To: =?ISO-8859-1?Q?jo=EBl_Winteregg?= CC: pgsql-jdbc@postgresql.org Subject: Re: XAResource implementation References: <1193736934.5565.40.camel@hatman> <4727420A.4060209@enterprisedb.com> <1193757567.5565.46.camel@hatman> In-Reply-To: <1193757567.5565.46.camel@hatman> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/181 X-Sequence-Number: 17753 joël Winteregg wrote: > Hello Heikki, > > Thanks for your answer. Yes, i'm using the following jdbc driver > version: 8.2-506.jdbc4.jar > > Do you have any other idea ? Should I tune something for the jdbc > driver ? Hmm. Looking at the logs on that forum, apparently Atomikos calls XAResource.start(TMJOIN) using a different connection: XAResourceTransaction 127.0.0.1.tm0000100044127.0.0.1.tm1: about to switch to XAResource org.postgresql.xa.PGXAConnection@364641 [thread: main] on: 07-10-28 12:37:53,333 XAResourceTransaction 127.0.0.1.tm0000100044127.0.0.1.tm1: switched to XAResource org.postgresql.xa.PGXAConnection@364641 [thread: main] on: 07-10-28 12:37:53,333 ... XAResource.start ( 127.0.0.1.tm0000100044127.0.0.1.tm1 , XAResource.TMNOFLAGS ) called on resource testDS1 represented by XAResource instance org.postgresql.xa.PGXAConnection@364641 [thread: main] on: 07-10-28 12:37:53,335 ... XAResource.end ( 127.0.0.1.tm0000100044127.0.0.1.tm1 , XAResource.TMSUCCESS ) called on resource testDS1 represented by XAResource instance org.postgresql.xa.PGXAConnection@364641 [thread: main] on: 07-10-28 12:37:53,434 ... XAResourceTransaction 127.0.0.1.tm0000100044127.0.0.1.tm1: about to switch to XAResource org.postgresql.xa.PGXAConnection@b6548 [thread: main] on: 07-10-28 12:37:53,441 XAResourceTransaction 127.0.0.1.tm0000100044127.0.0.1.tm1: switched to XAResource org.postgresql.xa.PGXAConnection@b6548 [thread: main] on: 07-10-28 12:37:53,442 ... Note how the PGXAConnection instance used above changes from PGXAConnection@364641 to PGXAConnection@b6548. Unfortunately that's the kind of transaction interleaving that we don't support. You said you tried setExclusiveConnectionMode(true), but I think there's something wrong with that. If I'm reading the Atomikos source code right, in exclusive connection mode it should use ExclusiveExternalXAPooledConnectionImp, but in your case it's using ExternalXAPooledConnectionImp, which according to the source code is used when not in exclusive connection mode. Are you sure you set that parameter in the right place? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com