[jbossts-issues] [JBoss JIRA] (JBTM-2906) It's not possible to combine start and end flags in call of XATerminator.recover

Tom Jenkinson (JIRA) issues at jboss.org
Tue Jun 13 09:51:00 EDT 2017


    [ https://issues.jboss.org/browse/JBTM-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420615#comment-13420615 ] 

Tom Jenkinson commented on JBTM-2906:
-------------------------------------

It might be nice and I see your point but:
https://docs.oracle.com/javaee/7/api/javax/resource/spi/XATerminator.html#recover-int-
Described as "One of"

However the XA spec does allow it:
"TMENDRSCAN
This flag indicates that xa_recover() should end the recovery scan after returning
the XIDs. If this flag is used in conjunction with TMSTARTRSCAN, the single
xa_recover() call starts and then ends a scan."

So let's go with allowing it.

> It's not possible to combine start and end flags in call of XATerminator.recover 
> ---------------------------------------------------------------------------------
>
>                 Key: JBTM-2906
>                 URL: https://issues.jboss.org/browse/JBTM-2906
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>          Components: JCA
>    Affects Versions: 5.6.1.Final
>            Reporter: Ondra Chaloupka
>            Assignee: Ondra Chaloupka
>            Priority: Minor
>
> Current implementation of {{XATerminator.recover}} (either for JTA or JTS) does not permit combining flags to use.
> https://github.com/jbosstm/narayana/blob/5.6.1.Final/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/XATerminatorImple.java#L323
> https://github.com/jbosstm/narayana/blob/5.6.1.Final/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/jca/XATerminatorImple.java#L246
> Flags are expected to be combined as their values are designed to use bitwise operators. Especially {{|}} is handy for starting and ending the recover scan in once.
> Currently we need to call
> {code}
> XATerminator.recover(XAResource.TMSTARTRSCAN);
> XATerminator.recover(XAResource.TMENDRSCAN);
> {code}
> Values are
> {code}
> XAResource.TMSTARTRSCAN : 16777216  : 1000000000000000000000000
> XAResource.TMENDRSCAN    : 8388608    : 100000000000000000000000
> {code}
> The way would  be ability to call the {{recover}} like this
> {code}
> XATerminator.recover(XAResource.TMSTARTRSCAN | XAResource.TMENDRSCAN);
> {code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbossts-issues mailing list