From: | Bryan Varner <bvarner(at)polarislabs(dot)com> |
---|---|
To: | |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL XAResource & GlassFish 3.1.2.2 |
Date: | 2013-02-13 02:28:54 |
Message-ID: | A2B35D2698B0C74F9B8333525E67ED0135FABC78@plindyexch02.polarislabs.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
So, in our testing, this has eliminated one source of error. We do see -some- improvement.
However, I'm -very- confused about why the XAResource implementation for postgres has so many condition checks, why it's tracking what xid was being serviced by the resource (these are global). It seems like the XAResource implementation isn't trusting the global transaction manager to actually track xids to resources.
Is this due to the overly simplistic isSameRM method, where it's not actually comparing if the resources is the same resource rather than the same rmid (pointer to an XAResource)?
I'm not an XA expert, but I've been doing some comparison / contrasting to other open source implementations, and it seems like other implementations are merely tracking some simple state (are we in a global tx or not?) but none of them are enforcing the restrictions the PG resource is regarding currentxid.
So I guess my question is, does anyone know why the pg XAResource was implemented in this fashion? I'm not trying to say it's wrong, it would just be very beneficial to understand why it's like this, and what the motivation was.
Regards,
-Bryan
________________________________________
From: pgsql-jdbc-owner(at)postgresql(dot)org [pgsql-jdbc-owner(at)postgresql(dot)org] on behalf of Bryan Varner [bvarner(at)polarislabs(dot)com]
Sent: Tuesday, February 12, 2013 1:53 PM
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] PostgreSQL XAResource & GlassFish 3.1.2.2
> Bryan,
>
> Can you test Heikki's patch with your code. Florent any chance you can
> give me java 5 patch or better yet a git pull
Sorry Dave, I'm not seeing a patch from Heikki in any email? is this all
happening on github?
Since this is a production issue for me, I'm having to be a little more
careful than just ramming test code into my environment and hoping it
all shakes out. I've also been talking with other developers from the
GlassFish project, attempting to understand better what their JTA TM
expects from a resource.
Regards,
-Bryan
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
From | Date | Subject | |
---|---|---|---|
Next Message | dmp | 2013-02-13 02:32:18 | Re: rounded brackets in prepared statement |
Previous Message | Ladislav DANKO | 2013-02-12 19:05:18 | rounded brackets in prepared statement |