Announcement Announcement Module
No announcement yet.
JMS channel transaction config Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS channel transaction config

    I'm new to spring integration and my app runs in jboss.
    this is my integration flow.

    here is my spring config snippet.
    <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 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
    integration experts, please provide some hints.


    • #3
      Since Spring Integration is buit on top of Spring (including JMS and Transaction support) I would suggest to read the following:

      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