Re: Two-phase commit with JDBC

From: Florent Guillaume <fguillaume(at)nuxeo(dot)com>
To: Edson Richter <edsonrichter(at)hotmail(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Two-phase commit with JDBC
Date: 2016-05-25 09:57:54
Message-ID: CAF-4BpOGX0fQpVJHvPOw=NZadp1mBL17OLHGOdePhr7XvU3_pQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

This is not PostgreSQL-specific.

You have to acquire a XADataSource then a XAConnection from it then its
Connection.

Here's a unit test doing the two phases:
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/test/java/org/postgresql/test/xa/XADataSourceTest.java#L174

Florent

On Wed, May 25, 2016 at 1:45 AM, Edson Richter <edsonrichter(at)hotmail(dot)com>
wrote:

> Hi,
>
> Can I use two phase commit in PostgreSQL using JDBC without JTA or XA
> specialized libraries (I mean, JDBC only)?
>
> Is there any simple J2SE example around?
>
>
> Thanks,
>
> --
> Atenciosamente,
>
> Edson Carlos Ericksson Richter
>
>

--
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeremy Whiting 2016-05-25 10:05:42 Re: Two-phase commit with JDBC
Previous Message Edson Richter 2016-05-24 23:45:53 Two-phase commit with JDBC