Hi,

I want to put in a "transaction" the following execution:
WS (queue reader)=>XSLT (transformation)

so that if the second compoment fails (e.g. in case of a bad XSLT transformation), the JMS message is not consumed and stays in the queue.

I have read SEDA flows support: Synchronous+Transactional <http://incubator.apache.org/servicemix/transactions.html>

My "conf" repository is like the original/distrib one.

My ServiceMix pipeline is quite simple and defined as below.

I am testing with a bad XSLT transformation. Result = the JMS message is consumed if the second stage fails.

Does someone have an idea ?

Many thanks.

Regards,
Dominique


NB : My ServiceMix pipeline is like :

<!-- FACTORY BEAN   -->
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
 <property name="brokerURL" value="${activemq.url}" />
</bean>

 <!-- the JBI container -->
 <sm:container id="jbi"
               rootDir="./data/smx"
               MBeanServer="#jmxServer"
               installationDirPath="./install"
               deploymentDirPath="./deploy"
               monitorInterval="1"
               transactionManager="#transactionManager"
               createJmxConnector="false"
               depends-on="jndi"
               flowName="seda"
               autoEnlistInTransaction="true">

       <sm:flows>
         <sm:sedaFlow />
       </sm:flows>
...

<sm:activationSpec componentName="inputReceiver_1">
       <sm:component>
       <jms:component>
           <jms:endpoints>
             <jms:endpoint
   role="consumer"
   endpoint="jmsbeginningpoint"
   service="foo:myJmsReceiver_1"
   connectionFactory="#connectionFactory"
   jmsProviderDestinationName="queue_1"
   destinationStyle="queue"
   targetService="foo:transformer"
   defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
   synchronous="true"
   />
           </jms:endpoints>
       </jms:component>
     </sm:component>
</sm:activationSpec>


<sm:activationSpec service="foo:transformer" componentName="transformer" endpoint="transformer"
     destinationService="foo:myJmsSender_2">
  <sm:component>
   <bean class="org.apache.servicemix.components.xslt.XsltComponent">
       <property name="xsltResource" value="transf_demo.xsl" />
   </bean>
  </sm:component>
</sm:activationSpec>



Reply via email to