Hi!

Tommy Hellstr�m wrote:
> > I think that if the sub-TM is added as a XAResource to the top-TM this
> > will work out by way of recursion. First of all, if the sub-TM dies,
> > then the top-TM *have to* rollback (by using .forget calls to all
> > XAResources).
> 
> I don't think that is the case cause the top-TM can send out COMMIT to other
> participant before it gets an exception from the failing sub-TM. 

Then the usual recovery protocol should be used: call recover() on the
sub-TM XAResource. Doesn't that make sense? Or is there some reason I am
missing why sub-TM's should not be treated as XAResources?

> I think
> forget() should be used to notify a resource, that earlier has made a
> heuristic decision and after that thrown a heuristic exception, to forget
> about it.

I would say that if all prepare()'s went well and an error occurs during
commit phase, then use recover(). However if an error occurs during the
prepare phase then the tx must rollback, and hence forget() is used
instead. That seems reasonable, but I might be wrong.

/Rickard

-- 
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

Reply via email to