Bug 780200 (SOA-2583) - JCA-JMS Transaction Rollback failed
Summary: JCA-JMS Transaction Rollback failed
Keywords:
Status: CLOSED NOTABUG
Alias: SOA-2583
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.0.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-14 08:55 UTC by Ravisankar Challa
Modified: 2010-11-16 14:36 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Windows 7 OS, SOA-P 5.0.2,
Last Closed: 2010-11-16 14:36:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Exception.log (65.95 KB, text/plain)
2010-11-14 08:57 UTC, Ravisankar Challa
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2583 0 Minor Closed JCA-JMS Transaction Rollback failed 2013-02-12 19:02:50 UTC

Description Ravisankar Challa 2010-11-14 08:55:11 UTC
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.

Comment 1 Ravisankar Challa 2010-11-14 08:57:36 UTC
Log shows that there is a ActionProcessingException

Comment 2 Ravisankar Challa 2010-11-14 08:57:36 UTC
Attachment: Added: Exception.log


Comment 3 Ravisankar Challa 2010-11-14 08:58:07 UTC
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>




Comment 4 Kevin Conner 2010-11-15 09:12:46 UTC
Unfortunately your assumption is incorrect.  The ActionProcessingException is an application exception which is returned to the invoker of the ESB service.

Comment 5 Ravisankar Challa 2010-11-15 10:14:35 UTC
In this case the service invoker is jms-jca-provider which ideally should rollback the transaction.. but it is not happening.

Comment 6 Kevin Conner 2010-11-15 10:54:37 UTC
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




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