Bug 980802 - ESB ignoring transacted flag on EPR element
ESB ignoring transacted flag on EPR element
Status: ASSIGNED
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.3.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: FUTURE
Assigned To: tcunning
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-03 05:24 EDT by Adam Kovari
Modified: 2015-08-31 23:04 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
SOA 5.3.1
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3941 Major Open ESB ignoring transacted flag on EPR element 2014-08-06 16:14:18 EDT

  None (edit)
Description Adam Kovari 2013-07-03 05:24:00 EDT
Description of problem:
For example

> <jbossesb-listeners 
> deployment="Quickstart_JMS_Transacted.esb"  
>  parameterReloadSecs="5">  
> <listener 
> busIdRef="quickstartEsbChannel" 
> listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" 
> maxThreads="1" 
> mep="OneWay" 
> name="jmssecured" 
> service-category="JMSSecuredESB"
>  service-description="JMS Secured quickstart sample" 
>  service-name="SimpleListener">
> <EPR
>  acknowledge-mode="AUTO_ACKNOWLEDGE" 
>  connection-factory="XAConnectionFactory"
>   destination-name="queue/quickstart_jms_transacted_Request_esb"
>    destination-type="queue"
>     persistent="true"
>      protocol="jms"  
>       transacted="true"/>  


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 
> 
> From 
> 	transactional = _config.getBooleanAttribute(ListenerTagNames.TRANSACTED_TAG, false) ;	
> To
> 	transactional = _config.getChildren("EPR")[0]..getBooleanAttribute(ListenerTagNames.TRANSACTED_TAG, false) ;
Comment 1 JBoss JIRA Server 2013-07-19 10:55:34 EDT
Kevin Conner <kevin.conner@jboss.com> 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.
Comment 2 tcunning 2014-10-01 14:30:20 EDT
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.    

Example :                 
<jms-listener name="helloWorld"
                              busidref="quickstartEsbChannel">
  <property name="transacted" value="true"/>
</jms-listener>

Note You need to log in before you can comment on or make changes to this bug.