Results 1 to 2 of 2

Thread: Using JtaTransactionManager, database transaction is not rollbacked

Hybrid View

  1. #1
    Join Date
    Jun 2010
    Location
    Paris
    Posts
    106

    Default Using JtaTransactionManager, database transaction is not rollbacked

    Hello,

    I need a XA transaction between a JMS queue and a database. To achieve this, I have set the transactionManager of my MessageListenerContainer to a JtaTransactionManager (using jenks library, as I'm not on a J2EE server).

    Code:
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
    	<constructor-arg>
    		<bean class="org.jencks.factory.TransactionManagerFactoryBean" />
    	</constructor-arg>
    </bean>
    However, when a RuntimeException occurs during the process of a message after the insertion in database, the database transaction is commited anyway and the same message is played again.
    In other words, the JMS transaction is rollbacked but not the database transaction.

    Any idea why?
    Thank you !

    Pierre

  2. #2
    Join Date
    Jun 2010
    Location
    Paris
    Posts
    106

    Default

    This probably has nothing to do with Spring Integration. I'll give it a try in Spring Forum first.
    Sorry!

Tags for this Thread

Posting Permissions

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