pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: XA support
Date: Thu, 30 Jun 2005 10:19:00 +1200
Message-ID: <42C31E54.20000@opencloud.com> (raw)
In-Reply-To: <Pine.OSF.4.61.0506291920120.108382@kosh.hut.fi>
References: <Pine.OSF.4.61.0506291920120.108382@kosh.hut.fi>

Heikki Linnakangas wrote:

> B. When the second transaction starts, the first transaction is prepared
> behind the scenes, freeing the connection for the new transaction.

This is probably the way to go initially, since it's much simpler. It
should also deal with the more common uses of XA where you're just
coordinating 2 or more resources in an otherwise straightforward
begin-do stuff-commit sequence. We can get clever later :)

Related issues: supporting this case:

  xaRes.start(xid1, XAResource.TMNOFLAGS);
  stmt.executeUpdate("...");
  xaRes.end(xid1, XAResource.TMSUSPEND);
  // ...
  xaRes.start(xid1, XAResource.TMRESUME);
  stmt.executeUpdate("...");
  xaRes.end(xid1, XAResource.TMSUCCESS);

and this one:

  xaRes.start(xid1, XAResource.TMNOFLAGS);
  stmt.executeUpdate("...");
  xaRes.end(xid1, XAResource.TMSUCCESS);
  // ...
  xaRes.start(xid1, XAResource.TMJOIN);
  stmt.executeUpdate("...");
  xaRes.end(xid1, XAResource.TMSUCCESS);

and this one (yow!):

 (thread 1):
  xaRes.start(xid1, XAResource.TMNOFLAGS);
  stmt.executeUpdate("...");

 (thread 2):
  xaRes.start(xid1, XAResource.TMJOIN);
  stmt.executeUpdate("...");

-O



view thread (13+ messages)  latest in thread

Message-ID: <42C31E54.20000@opencloud.com>
Permalink:  ../42C31E54.20000@opencloud.com/
Also on:    postgresql.org/message-id/42C31E54.20000@opencloud.com

 · 

reply

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: oliver@opencloud.com, hlinnaka@iki.fi
  Subject: Re: XA support
  In-Reply-To: <42C31E54.20000@opencloud.com>
  References: <Pine.OSF.4.61.0506291920120.108382@kosh.hut.fi> <42C31E54.20000@opencloud.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