On 21 Jan 2011, at 17:15, Mircea Markus wrote:
On 21 Jan 2011, at 16:34, Galder Zamarreño wrote:
> Hi,
>
> Re:
https://issues.jboss.org/browse/ISPN-845
>
> This is causing issues with use cases such as the Hibernate 2LC. Imagine this
scenario:
>
> tx.begin();
> cache1.get();
> cache2.put();
> cache3.remove();
> tx.commit();
>
> At commit time, 3 prepares are generated of which, the 1st prepare is marked as
readonly (no mods made on cache1), so that prepare is committed in advance.
>
> Now, when tx.commit() is called it fails cos the first tx for cache1 has already been
committed.
I guess this is because the XAResource doesn't find the tx in the transaction table.
I guess the way to go is to delist it after committing, let me ping Jonathan to see :)
if (trace) log.trace("no tx found for {0}", xid);
throw new XAException(XAException.XAER_NOTA);
What TM are you using?
I've just confirmed with Jonathan - according to XA spec, the TM should NOT call
commit on a resource that has answered Readonly from the prepare.