Red Hat Bugzilla – Bug 980802
ESB ignoring transacted flag on EPR element
Last modified: 2015-08-31 23:04:44 EDT
Description of problem:
> service-description="JMS Secured quickstart sample"
If you set a breakpoint on the MessageAwareListener where it retrieves the value for 'transacted', i.e. "transactional = _config.getBooleanAttribute(ListenerTagNames.TRANSACTED_TAG, false) ;", and if you then in Eclipse Debug mode analyse the 'this._config' (the ConfigTree variable), you can see that that ConfigTree does not have a 'transacted' key in its '_attributes' map. However, one of the Child ConfigTrees of this Listener tree, the 'EPR' ConfigTree, does have a 'transacted = true' value in it's tree. However, _config.getBooleanAttribute(..) does not do a recursive search through the child ConfigTrees (and it probably shouldn't, I'm not sure how this was designed), which explains why it does not return 'true'.
> I have a proposed hack/fix that would resolve this.
> In MessageAwareListener line 169. Replace
> transactional = _config.getBooleanAttribute(ListenerTagNames.TRANSACTED_TAG, false) ;
> transactional = _config.getChildren("EPR")..getBooleanAttribute(ListenerTagNames.TRANSACTED_TAG, false) ;
Kevin Conner <firstname.lastname@example.org> made a comment on jira JBESB-3941
One comment to make is that the EPR is for the caller and not the service and it should be possible to specify these differently, as such the suggested fix is not really correct. As a workaround it is likely possible to specify the transacted flag as a property on the service.
I did some testing on this one and Kevin's workaround seems to be fine, with the change that the property should be added to the listener, not the service.
<property name="transacted" value="true"/>