I think that in your scenario, no transaction is started.
You should configure the jms consumer to use JCA instead
of plain jms.  This would ensure a transaction is started by the
jms component, the message consumption would be enlisted
in the transaction, and the transaction would be sent with the
exchange to the next step...

On 3/8/07, Dominique DE VITO <[EMAIL PROTECTED]> wrote:

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>






--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Reply via email to