Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E721B9F9AE4 for ; Mon, 17 Sep 2007 08:59:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 38660-09 for ; Mon, 17 Sep 2007 08:59:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 2C8859F9B1C for ; Mon, 17 Sep 2007 08:59:37 -0300 (ADT) thread-index: Acf5IkEwbXxt8EIlSvWjFvvU09va4w== Received: from [172.24.32.135] ([62.232.55.118]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Sep 2007 07:59:50 -0400 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073 Message-ID: <46EE6BDA.5020503@enterprisedb.com> Date: Mon, 17 Sep 2007 12:58:18 +0100 From: "Heikki Linnakangas" User-Agent: Icedove 1.5.0.12 (X11/20070730) MIME-Version: 1.0 To: "teknokrat" Cc: Subject: Re: making the XARessource serializable References: <46EE5482.9060603@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Sep 2007 11:59:51.0828 (UTC) FILETIME=[41032D40:01C7F922] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/83 X-Sequence-Number: 17505 teknokrat wrote: > From what i have managed to make out, Arjuna has a xa recovery module > that can recover resources if the XAResource is serializable. Things get > more complicated if its not. I've recompiled the jdbc drivers, making > PGXAConnection serializable and it worked. What exactly did you do to "make PGXAConnection serializable"? If you just add "implements Serializable", you'll get an NotSerializableException when you actually try to serialize it. > This is a link illustrating > the behaviour we were getting > http://wiki.jboss.org/wiki/Wiki.jsp?page=TxNonSerializableXAResource According to that, you need to provide an implementation of com.arjuna.ats.jta.recovery.XAResourceRecovery. Apparently there's a simple implementation that looks up the XADataSource implementation with JNDI. See JBoss Transaction API Programmers Guide, chapter 4, title "Shipped XAResourceRecovery implementations". I'm surprised Arjuna/JBoss doesn't just connect to every database listed in JNDI, or at least all those that were used in the transactions that need recovery. That's what other app servers do, I believe. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com