3 Replies Latest reply on Sep 2, 2010 2:15 PM by Eric Bustad

    JBoss transactional web service

    Eric Bustad Newbie

      I am trying to setup two services under JBossESB, one of which receives a SOAP message from a client, generates a XML file, and passes that to the second service.  The second service is responsible for sending that XML file to a remote non-ESB aware web service.   These two services are connected by a queue.


      I would like the process of the second service taking a message off the queue and sending it to the remote web service to be a single transaction.

      If any of the actions in the service throws an exception, I would want the message to be left on the queue and redelivery attempted after a delay.


      I have tried to model this after the jms_transacted quickstart.  However, it seems that the message is not left on the queue after a failure of the second service and, so, no redelivery is attempted.


      I had thought that specifying the transacted="true" attribute on the <jms-message-filter> element and the use of <jms-jca-provider> would accomplish this, but obviously not.  Or I an doing something else wrong?


      I am using jbossesb-server-4.7, which came with JBoss Messaging rather than JBossMQ.

      Below is a redacted version of my jboss-esb.xml file:


      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
      xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd ..\..\..\docs\schema\jbossesb-1.2.0.xsd"

      <war-security method="BASIC" domain="JBossWS" />


            <http-provider name="http">
               <http-bus busid="secureFriends">
                     <role name="friend"></role>
                     <method name="GET"/>
                     <method name="POST"/>
               <exception mappingsFile="/http-exception-mappings.properties"></exception>
            <jms-jca-provider name="JBossMessaging" connection-factory="ConnectionFactory">
               <jms-bus busid="queueZ">
                  <jms-message-filter dest-type="QUEUE" dest-name="queue/Z" transacted="true"/>
                  <property name="dLQMaxResent" value="111"/>



            <service category="PLMWebServices" name="PLMExport" invmScope="GLOBAL" description="Export PLM objects in XML format to a target system">

               <property name="maxThreads" value="1"/>
                  <http-gateway name="http" busidref="secureFriends">
                     <property name="synchronousTimeout" value="220000"/>


               <actions mep="RequestResponse" faultXsd="/fault.xsd" inXsd="/request.xsd" outXsd="/response.xsd">

                  <action name="dmsExport"/>

                  <action name="sendToTargets">
                     <property name="destinations">
                        <route-to service-category="PLMInternal" service-name="TargetTransport"/>


            <service category="PLMInternal" name="TargetTransport" description="Transport Service for target">
               <property name="maxThreads" value="1">1</property>
                  <jms-listener name="queueZ" busidref="queueZ" />
               <actions mep="OneWay">

                  <action name="send2import">
                     <property name="endpointUrl" value="https://remotehost:8443/PLMImport">
                        <http-client-property name="file" value="/PLMImport-http.properties" />
                     <property name="method" value="POST"/>
                     <property name="responseType" value="STRING"/>