[jbossts-issues] [JBoss JIRA] (JBTM-1639) Improve XTS Api for looking up Recovery Manager to prevent developer from poling

Paul Robinson (JIRA) jira-events at lists.jboss.org
Tue Aug 27 10:49:27 EDT 2013


     [ https://issues.jboss.org/browse/JBTM-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Robinson updated JBTM-1639:
--------------------------------

    Fix Version/s: 6.0.0.Final
                       (was: 5.0.0.Final)

    
> Improve XTS Api for looking up Recovery Manager to prevent developer from poling
> --------------------------------------------------------------------------------
>
>                 Key: JBTM-1639
>                 URL: https://issues.jboss.org/browse/JBTM-1639
>             Project: JBoss Transaction Manager
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: XTS
>            Reporter: Paul Robinson
>            Assignee: Paul Robinson
>             Fix For: 6.0.0.Final
>
>
> Currently the developer needs to poll for the RecoveryManager as it's possible that the application can be deployed before the XTS subsystem has finished startup.
> This issue was worked around in JBTM-1522 and in the TXBridge tests, by having the application poll until the RM was not null.
> Two possible solutions:
> Have a blocking call to XTSATRecoveryManager.getRecoveryManager() that doesn't return until there is an RM available. if we use the existing java method, we need to analyse all usages to make sure returning null is not a valid outcome.
> Another solution is to find out how to delay the application's initialisation until after XTS has started. This puts the burden on the application developer to implement, but requires no changes to the XTS code. See JBTM-1522 for alternative mechanisms for initialising the application. I tried three and none of them fired after the server had booted.
> To Reproduce
> Put breakpoints on:
> Application's usage of: XTSATRecoveryManager.getRecoveryManager(); //Stop all threads
> XTSATRecoveryManager.setRecoveryManager() // stop on Thread only  
> Copy your application to the deploy directory (xtstest.war is a good choice). Now start the server with debugging enabled (suspend=y). To reproduce this you will see the XTSATRecoveryManager.setRecoveryManager() BP fire, and then shortly after the XTSATRecoveryManager.getRecoveryManager() BP will fire. Allow the getRecoveryManager to continue and you will notice it is null. Fix this problem, and the getRecoveryManager will wait until the setRecoveryManager is complete and thus always return a non-null RM.
> Once this is fixed, find all occurrence of the polling work-around and have them use the solution to this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list