You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Lin Sun (JIRA)" <ji...@apache.org> on 2008/12/10 21:54:44 UTC

[jira] Created: (GERONIMO-4461) Improve exception during transaction manager one phase commit

Improve exception during transaction manager one phase commit
-------------------------------------------------------------

                 Key: GERONIMO-4461
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4461
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: transaction manager
    Affects Versions: 2.2
            Reporter: Lin Sun
            Assignee: Lin Sun
             Fix For: 2.2


Currently,  during transaction manager one phase commit, if there is XAException arise from XAResource.commit, the code just throws RollbackException.

We should provide a more detailed Exceptions, that is:

1. If the XAException is XAException.XA_HEURRB, we throw HeuristicRollbackException, and call XAResource to forget
2. If the XAException is XAException.XA_HEURMIX, we throw HeuristicMixedException, and call XAResource to forget
3. If the XAException is XAException.XA_HEURCOM, we don't need to inform the transaction originator, but we want to call XAResource to forget.
4. Other XAException, throw RollbackException, same as the current code.

Thoughts?

Lin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-4461) Improve exception during transaction manager one phase commit

Posted by "Lin Sun (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lin Sun updated GERONIMO-4461:
------------------------------

    Affects Version/s: 2.1.4

> Improve exception during transaction manager one phase commit
> -------------------------------------------------------------
>
>                 Key: GERONIMO-4461
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4461
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: transaction manager
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Lin Sun
>            Assignee: Lin Sun
>             Fix For: 2.1.4, 2.2
>
>
> Currently,  during transaction manager one phase commit, if there is XAException arise from XAResource.commit, the code just throws RollbackException.
> We should provide a more detailed Exceptions, that is:
> 1. If the XAException is XAException.XA_HEURRB, we throw HeuristicRollbackException, and call XAResource to forget
> 2. If the XAException is XAException.XA_HEURMIX, we throw HeuristicMixedException, and call XAResource to forget
> 3. If the XAException is XAException.XA_HEURCOM, we don't need to inform the transaction originator, but we want to call XAResource to forget.
> 4. Other XAException, throw RollbackException, same as the current code.
> Thoughts?
> Lin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4461) Improve exception during transaction manager one phase commit

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655402#action_12655402 ] 

David Jencks commented on GERONIMO-4461:
----------------------------------------

We might seek more guidance from experts on this, but I would think that we don't want to automatically forget anything associated with a tx that is completed heuristically.  That means that something went very seriously wrong and IMO we shouldn't erase any info that bears on it -- hopefully someone will be along soon to try to figure out what happened.

For XAException.XA_HEURCOM, doesn't that mean that the tm could not figure out if some of the resource managers committed, but committed all the ones it could?  If so, the state of at least one resource manager is unknown so we should definitely inform the tx originator.

As far as your proposed tx mapping, it looks good to me.

Also I don't think there are any cases right now where we would get a heuristic exception here.... that would mean the single resource is a remote tm, something that we don't support directly ourselves at the moment.

> Improve exception during transaction manager one phase commit
> -------------------------------------------------------------
>
>                 Key: GERONIMO-4461
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4461
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: transaction manager
>    Affects Versions: 2.2
>            Reporter: Lin Sun
>            Assignee: Lin Sun
>             Fix For: 2.2
>
>
> Currently,  during transaction manager one phase commit, if there is XAException arise from XAResource.commit, the code just throws RollbackException.
> We should provide a more detailed Exceptions, that is:
> 1. If the XAException is XAException.XA_HEURRB, we throw HeuristicRollbackException, and call XAResource to forget
> 2. If the XAException is XAException.XA_HEURMIX, we throw HeuristicMixedException, and call XAResource to forget
> 3. If the XAException is XAException.XA_HEURCOM, we don't need to inform the transaction originator, but we want to call XAResource to forget.
> 4. Other XAException, throw RollbackException, same as the current code.
> Thoughts?
> Lin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4461) Improve exception during transaction manager one phase commit

Posted by "Lin Sun (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656118#action_12656118 ] 

Lin Sun commented on GERONIMO-4461:
-----------------------------------

Hi David, thanks for your comments!

Regarding calling forget, I found the following in the OTS v1.4 spec (under 2.8.5)

This forget operation is performed only if the resource raised a heuristic outcome exception 
to rollback, commit, commit_one_phase, or prepare. Once the coordinator has 
determined that the heuristic situation has been addressed, it should issue forget on 
the resource. The resource can forget all knowledge of the transaction. 

What is not clear to me is what can TM do to address the heuristic situation, other than throw the exception out to the originator and set the transaction status?

Regarding XAException.XA_HEURCOM, it means "The transaction branch has been heuristically committed. ", per JTA spec.   I think XAException.XA_HEURMIX means committed some and rolled back some.

Regarding test cases, I have some test cases that would arise these XAExceptions during commit/rollback at the XAResource impl.   


> Improve exception during transaction manager one phase commit
> -------------------------------------------------------------
>
>                 Key: GERONIMO-4461
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4461
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: transaction manager
>    Affects Versions: 2.2
>            Reporter: Lin Sun
>            Assignee: Lin Sun
>             Fix For: 2.2
>
>
> Currently,  during transaction manager one phase commit, if there is XAException arise from XAResource.commit, the code just throws RollbackException.
> We should provide a more detailed Exceptions, that is:
> 1. If the XAException is XAException.XA_HEURRB, we throw HeuristicRollbackException, and call XAResource to forget
> 2. If the XAException is XAException.XA_HEURMIX, we throw HeuristicMixedException, and call XAResource to forget
> 3. If the XAException is XAException.XA_HEURCOM, we don't need to inform the transaction originator, but we want to call XAResource to forget.
> 4. Other XAException, throw RollbackException, same as the current code.
> Thoughts?
> Lin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-4461) Improve exception during transaction manager one phase commit

Posted by "Lin Sun (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lin Sun resolved GERONIMO-4461.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.4

see subversion commits tab

> Improve exception during transaction manager one phase commit
> -------------------------------------------------------------
>
>                 Key: GERONIMO-4461
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4461
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: transaction manager
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Lin Sun
>            Assignee: Lin Sun
>             Fix For: 2.1.4, 2.2
>
>
> Currently,  during transaction manager one phase commit, if there is XAException arise from XAResource.commit, the code just throws RollbackException.
> We should provide a more detailed Exceptions, that is:
> 1. If the XAException is XAException.XA_HEURRB, we throw HeuristicRollbackException, and call XAResource to forget
> 2. If the XAException is XAException.XA_HEURMIX, we throw HeuristicMixedException, and call XAResource to forget
> 3. If the XAException is XAException.XA_HEURCOM, we don't need to inform the transaction originator, but we want to call XAResource to forget.
> 4. Other XAException, throw RollbackException, same as the current code.
> Thoughts?
> Lin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.