Steps to Reproduce: I am pasting here my Jboss-esb.xml <?xml version="1.0"?> <jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"> <providers> <jms-jca-provider connection-factory="XAConnectionFactory" name="JBossMessaging"> <jms-bus busid="quickstartGwChannel"> <jms-message-filter dest-name="quickstart_jms_transacted_Request_gw" dest-type="QUEUE" transacted="true"/> </jms-bus> <jms-bus busid="quickstartEsbChannel"> <jms-message-filter dest-name="quickstart_jms_transacted_Request_esb" dest-type="QUEUE" transacted="true"/> </jms-bus> <activation-config> <property name="dLQMaxResent" value="5"/> </activation-config> </jms-jca-provider> </providers> <services> <service category="JMSSecuredESB" description="JMS Secured quickstart sample" name="SimpleListener"> <listeners> <jms-listener busidref="quickstartGwChannel" is-gateway="true" maxThreads="1" name="JMS-Gateway"/> <jms-listener busidref="quickstartEsbChannel" maxThreads="1" name="jmssecured"/> </listeners> <actions mep="OneWay"> <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessage"> <property name="message" value="JMS Transacted Quickstart entered. Message body"/> <property name="printfull" value="false"/> </action> <action class="org.jboss.soa.esb.actions.routing.http.HttpRouter" name="CallPPWebService"> <property name="method" value="POST"/> <property name="endpointUrl" value="http://localhost:1234/PaymentProcessingService"/> </action> <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessageDone"> <property name="message" value="JMS Transacted Quickstart processed successfully. Message body"/> <property name="printfull" value="false"/> </action> </actions> </service> </services> </jbossesb> project_key: SOA I am testing the quick start "jms_transacted". I modified the example to make a call to webservice (of type asynchronous) instead of writing to DB & then throwing exception. JMS Queue -> ESB -> Webservice Call I assume if ActionProcessingException occurs inside the ESB action pipeline transaction should be rolled back. If the webservice is down transaction is not getting roll-backed.
Log shows that there is a ActionProcessingException
Attachment: Added: Exception.log
Steps to Reproduce: Removed: I a pasting here my Jboss-esb.xml <?xml version="1.0"?> <jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"> <providers> <jms-jca-provider connection-factory="XAConnectionFactory" name="JBossMessaging"> <jms-bus busid="quickstartGwChannel"> <jms-message-filter dest-name="quickstart_jms_transacted_Request_gw" dest-type="QUEUE" transacted="true"/> </jms-bus> <jms-bus busid="quickstartEsbChannel"> <jms-message-filter dest-name="quickstart_jms_transacted_Request_esb" dest-type="QUEUE" transacted="true"/> </jms-bus> <activation-config> <property name="dLQMaxResent" value="5"/> </activation-config> </jms-jca-provider> </providers> <services> <service category="JMSSecuredESB" description="JMS Secured quickstart sample" name="SimpleListener"> <listeners> <jms-listener busidref="quickstartGwChannel" is-gateway="true" maxThreads="1" name="JMS-Gateway"/> <jms-listener busidref="quickstartEsbChannel" maxThreads="1" name="jmssecured"/> </listeners> <actions mep="OneWay"> <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessage"> <property name="message" value="JMS Transacted Quickstart entered. Message body"/> <property name="printfull" value="false"/> </action> <action class="org.jboss.soa.esb.actions.routing.http.HttpRouter" name="CallPPWebService"> <property name="method" value="POST"/> <property name="endpointUrl" value="http://localhost:1234/PaymentProcessingService"/> </action> <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessageDone"> <property name="message" value="JMS Transacted Quickstart processed successfully. Message body"/> <property name="printfull" value="false"/> </action> </actions> </service> </services> </jbossesb> Added: I am pasting here my Jboss-esb.xml <?xml version="1.0"?> <jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"> <providers> <jms-jca-provider connection-factory="XAConnectionFactory" name="JBossMessaging"> <jms-bus busid="quickstartGwChannel"> <jms-message-filter dest-name="quickstart_jms_transacted_Request_gw" dest-type="QUEUE" transacted="true"/> </jms-bus> <jms-bus busid="quickstartEsbChannel"> <jms-message-filter dest-name="quickstart_jms_transacted_Request_esb" dest-type="QUEUE" transacted="true"/> </jms-bus> <activation-config> <property name="dLQMaxResent" value="5"/> </activation-config> </jms-jca-provider> </providers> <services> <service category="JMSSecuredESB" description="JMS Secured quickstart sample" name="SimpleListener"> <listeners> <jms-listener busidref="quickstartGwChannel" is-gateway="true" maxThreads="1" name="JMS-Gateway"/> <jms-listener busidref="quickstartEsbChannel" maxThreads="1" name="jmssecured"/> </listeners> <actions mep="OneWay"> <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessage"> <property name="message" value="JMS Transacted Quickstart entered. Message body"/> <property name="printfull" value="false"/> </action> <action class="org.jboss.soa.esb.actions.routing.http.HttpRouter" name="CallPPWebService"> <property name="method" value="POST"/> <property name="endpointUrl" value="http://localhost:1234/PaymentProcessingService"/> </action> <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessageDone"> <property name="message" value="JMS Transacted Quickstart processed successfully. Message body"/> <property name="printfull" value="false"/> </action> </actions> </service> </services> </jbossesb>
Unfortunately your assumption is incorrect. The ActionProcessingException is an application exception which is returned to the invoker of the ESB service.
In this case the service invoker is jms-jca-provider which ideally should rollback the transaction.. but it is not happening.
No, it shouldn't. The pipeline tried to send a fault message but couldn't as there was nowhere to send it. 19:51:26,550 WARN [ActionProcessingPipeline] No fault address defined for fault message! To: JMSEpr [ PortReference < <wsa:Address jms:localhost:1099#quickstart_jms_transacted_Request_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : quickstart_jms_transacted_Request_esb/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : XAConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : true/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: 306d96d7-b482-4b0b-92f9-0f85da58a645 RelatesTo: jms:correlationID#306d96d7-b482-4b0b-92f9-0f85da58a645