commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
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?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message