[JBoss JIRA] (JBTM-3325) Create a way to close XAResource at the end of the recovery cycle processing
by Ondrej Chaloupka (Jira)
[ https://issues.redhat.com/browse/JBTM-3325?page=com.atlassian.jira.plugin... ]
Ondrej Chaloupka edited comment on JBTM-3325 at 6/3/20 6:22 AM:
----------------------------------------------------------------
[~mmusgrov] I will create the discussion thread on the google groups. Just quick points from my perspective.
ad 1) This is an additional feature which can be or could not be used. It may help for some integration purposes (ie. Agroal-Quarkus in particular)
ad 2) During the recovery it's the recovery manager thread which uses the XAResource and up to the decision of RM by implementing {{AutoCloseable}} and configure Narayana and provide appropriate instance (ie. probably non-shared) of XAResource.
ad 3) We talk about recovery manager here not about TM.
ad 4) Agree with the analysis. This issue is a follow-up of an internal discussion on how to help Agroal with integration to Narayana recovery. This change/feature is particular for Narayana and its behaviour.
E.g. as one single point of all mentioned - as said Narayana is JTA implementation (not XA while on top of XA) and it does not use the {{int}} to ask for more items on {{recover}} call at all.
was (Author: ochaloup):
[~mmusgrov] I will create the discussion thread on the google groups. Just quick points from my perspective.
ad 1) This is an additional feature which can be or could not be used. It may help for some integration purposes (ie. Agroal-Quarkus in particular)
ad 2) During the recovery it's the recovery manager thread which uses the XAResource and up to the decision of RM by implementing {{AutoCloseable}} and configure Narayana and provide appropriate instance (ie. probably non-shared) of XAResource.
ad 3) We talk about recovery manager here not about TM.
ad 4) Agree with the analysis. This issue is the follow-up on our discussion on how to help with integration with Agroal. This feature is particular for Narayana and its behaviour.
E.g. as one single point of all mentioned - as said Narayana is JTA implementation (not XA while on top of XA) and it does not use the {{int}} to ask for more items on {{recover}} call at all.
> Create a way to close XAResource at the end of the recovery cycle processing
> ----------------------------------------------------------------------------
>
> Key: JBTM-3325
> URL: https://issues.redhat.com/browse/JBTM-3325
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Components: JTA
> Affects Versions: 5.10.5.Final
> Reporter: Ondrej Chaloupka
> Assignee: Ondrej Chaloupka
> Priority: Major
>
> From discussions about Narayana integration to Agroal (https://agroal.github.io/) there came an idea how to make easier for Agroal to integrate with Narayana recovery processing.
> Usually (or at least Agroal does so) the brand new {{XAResource}} is provided from the call of the {{XAResourceRecovery}} (https://github.com/jbosstm/jboss-transaction-spi/blob/7.6.0.Final/src/mai...).
> aka. Agroal implements the {{XAResourceRecovery}} and register it with the Narayana with adding it to with https://github.com/jbosstm/jboss-transaction-spi/blob/7.6.0.Final/src/mai... to be used in {{XARecoveryModule}}.
> When the periodic recovery cycle ends the {{XAResource}} is not used (next time the recovery processing calls the {{XAResourceRecovery#getXAResources()}} to get the resource for scanning again). The transaction manager announces that the scan ended with call {{XAResource.recover(XAResource.TMENDRSCAN)}} (this is an internal to how Narayana works).
> It would be beneficial provide an option that Narayana closes {{XAResource}}s at the end of the recovery cycle when Narayana does not plan to use it again.
> The idea is to check if the {{XAResource}} is {{AutoCloseable}} and if so then the {{XAResource}} is closed at the end of the recovery cycle processing.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)