Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5Kau-0008Gb-Hc for pgsql-jdbc@arkaria.postgresql.org; Tue, 12 Feb 2013 18:28:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U5Kau-0007wZ-1t for pgsql-jdbc@arkaria.postgresql.org; Tue, 12 Feb 2013 18:28:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5Kat-0007wU-II for pgsql-jdbc@postgresql.org; Tue, 12 Feb 2013 18:28:39 +0000 Received: from mail.polarislabs.com ([64.72.132.35] helo=plindyet01.polarislabs.lan) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5Kas-0002TB-86 for pgsql-jdbc@postgresql.org; Tue, 12 Feb 2013 18:28:39 +0000 Received: from PLINDYCAS01.polarislabs.lan (192.168.25.34) by mail.polarislabs.com (192.168.25.33) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 12 Feb 2013 13:28:28 -0500 Received: from bvarner-desktop.polarislabs.lan (172.16.2.73) by PLINDYCAS01.polarislabs.lan (192.168.25.34) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 12 Feb 2013 13:28:33 -0500 Message-ID: <511A89CF.40000@polarislabs.com> Date: Tue, 12 Feb 2013 13:28:31 -0500 From: Bryan Varner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121215 Iceowl/1.0b1 Icedove/3.0.11 MIME-Version: 1.0 To: Subject: Re: PostgreSQL XAResource & GlassFish 3.1.2.2 References: <511A2C7F.1040104@vmware.com> <511A675B.3020207@polarislabs.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.2.73] X-Pg-Spam-Score: -0.2 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org > Maybe in PGXAConnection the field state (and maybe others) should be volatile? That might be appropriate for Java 5 +, but before the memory management changes introduced in 1.5, I don't think volatile access to state or currentXid is going to be enough to enforce the semantics the XAResource implementation is doing precondition checks against in a 'more than one thread' environment. Regards, -Bryan -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc