commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject [transaction] AbstractXAResource: prepare() with result XA_RDONLY without commit()
Date Thu, 22 Jun 2006 13:19:31 GMT
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.

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?

Regards,

Jörg


---------------------------------------------------------------------
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