Results 1 to 3 of 3

Thread: JMS channel transaction config

  1. #1

    Default JMS channel transaction config

    Hello,
    I'm new to spring integration and my app runs in jboss.
    this is my integration flow.
    inbound-channel-adapter->JMS-input-channel->message-router->direct-channel->service-activator->JMS-output-channel->outbound-channel-adapter

    here is my spring config snippet.
    Code:
    <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" />
    <tx:annotation-driven transaction-manager="jtaTransactionManager"/>
    <jee:jndi-lookup id="inboundQueue" jndi-name="activemq/queue/Inbound.Queue"/>
    <jms:channel id="inboundChannel" queue="inboundQueue" transaction-manager="jtaTransactionManager"/>
    searched the forum and couldn't find relevant answers.

    1.In the log, I see below line being printed often. what is it?
    DEBUG [org.springframework.transaction.jta.JtaTransaction Manager] (DefaultMessageListenerContainer-1) Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
    DEBUG [org.springframework.transaction.jta.JtaTransaction Manager] (DefaultMessageListenerContainer-1) Initiating transaction commit

    1.how does JMS-input-channel (underlying JMS queue) is affected in case of exceptions in the flow? if there is any error either message-router or direct-channel? will the message be republished? how do I control the transactions for this?

    2. same question for JMS-output-channel?

    thanks in advance

  2. #2

    Default

    integration experts, please provide some hints.

  3. #3
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Since Spring Integration is buit on top of Spring (including JMS and Transaction support) I would suggest to read the following:
    http://static.springsource.org/sprin.../html/jms.html
    http://static.springsource.org/sprin...ms.html#jms-tx
    http://static.springsource.org/sprin...ion-motivation

    This will explain the DefaultMessageListenerContainer, JtaTransactionManager etc.

    As far as error-handling the inbound-channel-adapter is an entry point and thus allows you to specify error-channel. This is the channel where all ErrorMessages (messages created once exception occurs) will be sent. From that point on you can handle errors. If you handle them and return successfully JMS will think everything went fine and will commit, otherwise it will roll back.

    You can read more about error-channels in the ref manual http://static.springsource.org/sprin...ce/htmlsingle/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •