You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Florent Guillaume <fg...@nuxeo.com> on 2012/06/13 17:48:21 UTC

connector/txmanager enlistment failure

Hi,

I'm wondering why no exception is raised in the following case:

- TransactionEnlistingInterceptor.getConnection calls
transaction.enlistResource(xares)
- TransactionImpl.enlistResource calls xaRes.start
- there's an XAException during start()
- TransactionImpl.enlistResource catches this, sets the transaction
rollback only, and returns false
- TransactionEnlistingInterceptor.getConnection does not check the
return value of transaction.enlistResource and returns

In the last step I would expect that if false is returned,
TransactionEnlistingInterceptor.getConnection would raise a new
ResourceException for instance (as is the case for other error cases).

Thanks,
Florent

-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Re: connector/txmanager enlistment failure

Posted by David Jencks <da...@yahoo.com>.
So what happens now is that the client requesting the connection gets one, but it's transaction status is "rollback only"

and what you are suggesting is that the client should get a ResourceException?

I haven't looked at the relevant specs lately, do you know if anything about this situation is described?  Do you know what other connector/tm implementations do?

thanks for the sharp eyes :-)
david jencks

On Jun 13, 2012, at 11:48 AM, Florent Guillaume wrote:

> Hi,
> 
> I'm wondering why no exception is raised in the following case:
> 
> - TransactionEnlistingInterceptor.getConnection calls
> transaction.enlistResource(xares)
> - TransactionImpl.enlistResource calls xaRes.start
> - there's an XAException during start()
> - TransactionImpl.enlistResource catches this, sets the transaction
> rollback only, and returns false
> - TransactionEnlistingInterceptor.getConnection does not check the
> return value of transaction.enlistResource and returns
> 
> In the last step I would expect that if false is returned,
> TransactionEnlistingInterceptor.getConnection would raise a new
> ResourceException for instance (as is the case for other error cases).
> 
> Thanks,
> Florent
> 
> -- 
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87