From: Heikki Linnakangas <heikki@enterprisedb.com>
To: teknokrat <teknokrat@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: making the XARessource serializable
Date: Mon, 17 Sep 2007 12:58:18 +0100
Message-ID: <46EE6BDA.5020503@enterprisedb.com> (raw)
In-Reply-To: <fclnkm$fms$1@sea.gmane.org>
References: <fclh8h$q9e$1@sea.gmane.org>
<46EE5482.9060603@enterprisedb.com>
<fclnkm$fms$1@sea.gmane.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: heikki@enterprisedb.com, teknokrat@yahoo.com
Subject: Re: making the XARessource serializable
In-Reply-To: <46EE6BDA.5020503@enterprisedb.com>
References: <fclh8h$q9e$1@sea.gmane.org> <46EE5482.9060603@enterprisedb.com> <fclnkm$fms$1@sea.gmane.org> <46EE6BDA.5020503@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox