]
Tom Jenkinson reassigned WFLY-4500:
-----------------------------------
Assignee: Philippe Marschall (was: Tom Jenkinson)
CMResourceService#stop fails to clean up
----------------------------------------
Key: WFLY-4500
URL:
https://issues.jboss.org/browse/WFLY-4500
Project: WildFly
Issue Type: Patch
Components: Transactions
Reporter: Philippe Marschall
Assignee: Philippe Marschall
CMResourceService#stop fails to clean up values that #start creates.
The issue is the line
{code}
jtaEnvironmentBean.getValue().getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap().remove(immediateCleanup);
{code}
immediateCleanup is a {{Boolean}} and the return type of
{{getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap()}} is {{Map<String,
Boolean>}}
So this line never does anything. The line should read
{code}
jtaEnvironmentBean.getValue().getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap().remove(jndiName);
{code}
because if we look a the #start method above we see
{code}
Map<String, Boolean> performImmediateCleanupOfConnectableResourceBranchesMap =
jtaEnvironmentBean.getValue().getPerformImmediateCleanupOfCommitMarkableResourceBranchesMap();
performImmediateCleanupOfConnectableResourceBranchesMap.put(jndiName, immediateCleanup);
{code}