Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 04F822E1652 for ; Thu, 6 Dec 2007 13:55:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52747-06 for ; Thu, 6 Dec 2007 13:55:14 -0400 (AST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 75BA72E023E for ; Thu, 6 Dec 2007 13:55:14 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id j3so710062ugf for ; Thu, 06 Dec 2007 09:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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=kLZITcrm2NqEelLagX3yd0/opPd0Z9rFJrcYwHWNzDs=; b=fZR/1MK/MdBpsx1Zx/5NEmZkSg8w2QTqLnLZhJw3ASR2gDTQK0EIzlvw9WGS7hjwwfoo3iQf7fMw/fyw1jC95+UJyPzTihxpBOEYb4GuGn6ab4wp5d972Ow16mnvIwoeUzcli8vBu+W6Btb7GZCdq0Y4ZwgdDog5IHo7tzvqh64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=D/m4wDR/qemURyuFeUciQvJ5eM9p9XC6oqooKEdv82QMyeB4aZiSodEVITaHTa5KD/e4mHWgnV4Z3bS0bpTi7SjdZke3bMPhuTQjjsBBcqhXHA4D/svWvSGdvAhdDIAt1U+//0eYWVAmP72hEepXh6WC2d840TKSrrMR5wvf5VA= Received: by 10.67.29.20 with SMTP id g20mr1721187ugj.1196963711803; Thu, 06 Dec 2007 09:55:11 -0800 (PST) Received: from ?192.168.1.34? ( [86.27.229.125]) by mx.google.com with ESMTPS id j3sm131527ugd.2007.12.06.09.55.08 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Dec 2007 09:55:09 -0800 (PST) Message-ID: <4758377A.60404@enterprisedb.com> Date: Thu, 06 Dec 2007 17:55:06 +0000 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.14pre (X11/20071020) MIME-Version: 1.0 To: "Jignesh K. Shah" CC: pgsql-jdbc@postgresql.org Subject: Re: JDBC XA Support and Sample code? References: <47571061.9040506@sun.com> In-Reply-To: <47571061.9040506@sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/50 X-Sequence-Number: 17905 Jignesh K. Shah wrote: > I am new to the XA world of PostgreSQL. What's the story of XA in > PostgreSQL JDBC Driver? Also are there examples on how to use the > "Experimental" XA driver in postgresql-jdbc? As Kris pointed out, it's not experimental. It's typically used together with an application server that also acts as the transaction manager, and manages the connections and transactions for you. In that case, you don't need to do anything special; if you use two database connections or other resource managers in a transaction, the application server will perform two-phase commit using the XA driver behind the scenes. The tricky part is configuring the application server/transaction manager to use the XA-enabled PGXADataSource. That's different on each product. It would be nice to get a sample config file and tutorial on Glassfish, hint hint ;-) -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com