commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Zeigermann" <oliver.zeigerm...@gmail.com>
Subject Re: [transaction] AbstractXAResource: prepare() with result XA_RDONLY without commit()
Date Thu, 22 Jun 2006 14:07:49 GMT
2006/6/22, Joerg Heinicke <joerg.heinicke@gmx.de>:
> I came across some further problems with the transactional FileResourceManager
> and the XAResource implementation.
>
> Simple deletes of resources did not get applied for me. Debugging showed that no
> commit was triggered.
>
> The reason: deleteResource() and createResource() in FileResourceManager were
> assumed as being read-only (TransactionContext.readOnly not set to false). The
> TransactionManager got XA_RDONLY as return value of XAResource.prepare() and so
> did not trigger commit() or rollback(). The transaction in FileResourceManager
> remains in uncompleted state. I'm going to commit a fix for this problem.

Hard to believe, but this really seems to be true. A fix should be
simple, right? Will you do that. I wonder why this hasn't shown
before?

> Second problem is the prepare() with result XA_RDONLY without commit(). I assume
> it is a bug in AbstractXAResource too, but maybe somebody can confirm it first.
> There is no clear comment about it in the spec. Only the API for XAResource says
> for XA_RDONLY: "The transaction branch has been read-only and has been
> committed." That is probably why the TransactionManager did not trigger a
> commit() on prepare() with XA_RDONLY. WDYT?

Yes, I think when the result is XA_RDONLY there is no need for a
commit, as there is nothing to commit. I just wonder when the
transaction is ended. When are the read locks set free?

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message