I have JMS backed channel, however I changed the transactionManager attribute so it as follows :-
Our transactionManager is currently (but will become JTA)Code:<int-jms:channel id="ackPublishJMSChannel" queue="ackPublishDestination" transaction-manager="transactionManager" concurrency="1-10"/>
This then give a continual loop of the following :-Code:<bean class="org.springframework.orm.jpa.JpaTransactionManager" id="transactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"> ...
This is without sending any message thru the application - I'm not sure what is happening or why anything is being committed - nothing's happened.Code:2013-01-21 18:09:23,098 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.EntityManagerFactoryUtils - Closing JPA EntityManager 2013-01-21 18:09:23,098 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT 2013-01-21 18:09:23,098 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.impl.SessionImpl - opened session at timestamp: 13587917630 2013-01-21 18:09:23.098:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 2013-01-21 18:09:23,114 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Opened new EntityManager [org.hibernate.ejb.EntityManagerImpl@3fbf43] for JPA transaction [INFO] Started Jetty Server 2013-01-21 18:09:23,114 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.transaction.JDBCTransaction - begin 2013-01-21 18:09:23,114 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC connection [INFO] Starting scanner at interval of 5 seconds. 2013-01-21 18:09:23,145 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.transaction.JDBCTransaction - current autocommit status: true 2013-01-21 18:09:23,145 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.transaction.JDBCTransaction - disabling autocommit 2013-01-21 18:09:23,145 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Not exposing JPA transaction [org.hibernate.ejb.EntityManagerImpl@3fbf43] as JDBC transaction because JpaDialect [org.springframewor k.orm.jpa.DefaultJpaDialect@1a03325] does not support JDBC Connection retrieval 2013-01-21 18:09:24,160 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Initiating transaction commit 2013-01-21 18:09:24,160 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Committing JPA transaction on EntityManager [org.hibernate.ejb.EntityManagerImpl@3fbf43] 2013-01-21 18:09:24,160 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.transaction.JDBCTransaction - commit 2013-01-21 18:09:24,176 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.transaction.JDBCTransaction - re-enabling autocommit 2013-01-21 18:09:24,176 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.transaction.JDBCTransaction - committed JDBC Connection 2013-01-21 18:09:24,176 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection 2013-01-21 18:09:24,176 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] 2013-01-21 18:09:24,207 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Closing JPA EntityManager [org.hibernate.ejb.EntityManagerImpl@3fbf43] after transaction 2013-01-21 18:09:24,207 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.EntityManagerFactoryUtils - Closing JPA EntityManager 2013-01-21 18:09:24,207 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT 2013-01-21 18:09:24,207 [DefaultMessageListenerContainer-1] DEBUG org.hibernate.impl.SessionImpl - opened session at timestamp: 13587917642 2013-01-21 18:09:24,207 [DefaultMessageListenerContainer-1] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Opened new EntityManager [org.hibernate.ejb.EntityManagerImpl@483946] for JPA transaction and then repeats forever ...
If I remove the transactionManager from the jms backed channel :-
then all is fine. Here I assume the default acknowledge="transacted" comes in to play.Code:<int-jms:channel id="ackPublishJMSChannel" queue="ackPublishDestination" concurrency="1-10"/>
This happens using both embedded ActiveMQ JMS and Weblogic JMS.
Also once the continual error occurs, I note that shutdown is not clean
I will try to attach the full log.


Reply With Quote
, I'm now left with an issue, where if a runtime exception occurs, the message goes to the errorChannel on the JMS inbound adapter - which is desired. But if the exception is of a certain type the error flow should continue, but now using JTA/XA it seems that the runtime exception has marked the Transaction as rollbackonly. I have posted this is as new Topic see 