Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4500

CMResourceService#stop fails to clean up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.0.0.CR1
    • None
    • Transactions
    • None

      CMResourceService#stop fails to clean up values that #start creates.

      The issue is the line

      jtaEnvironmentBean.getValue().getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap().remove(immediateCleanup);
      

      immediateCleanup is a Boolean and the return type of getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap() is Map<String, Boolean>

      So this line never does anything. The line should read

      jtaEnvironmentBean.getValue().getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap().remove(jndiName);
      

      because if we look a the #start method above we see

      Map<String, Boolean> performImmediateCleanupOfConnectableResourceBranchesMap = jtaEnvironmentBean.getValue().getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap();  
      performImmediateCleanupOfConnectableResourceBranchesMap.put(jndiName, immediateCleanup);
      

              pmarscha Philippe Marschall (Inactive)
              pmarscha Philippe Marschall (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: