Announcement Announcement Module
Collapse
No announcement yet.
DefaultMessageListenerContainer Transaction Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DefaultMessageListenerContainer Transaction Problem

    Hi everyone,

    I recently strarted working with Spring and JTA. I've been trying to process a message using the JTATransactionManager but I keep getting the following warning after I deploy my solution on Glasshish.
    I'm using Spring Framework 3.2.3 and Glassfish 3.1.2.2.

    [#|2013-06-11T17:06:41.502+0100|WARNING|glassfish3.1.2|javax. jms.Session.mqjmsra|_ThreadID=156;_ThreadName=Thre ad-2;|MQJMSRA_DS4001: commit():Illegal for a non-transacted Session:sessionId=3252512848414823937|#]

    [#|2013-06-11T17:06:47.502+0100|INFO|glassfish3.1.2|javax.ent erprise.system.std.com.sun.enterprise.server.loggi ng|_ThreadID=156;_ThreadName=Thread-2;|WARN :org.springframework.jms.listener.DefaultMessageLi stenerContainer - Setup of JMS message listener invoker failed for destination 'MessageQueue' - trying to recover. Cause: Local JMS transaction failed to commit; nested exception is javax.jms.IllegalStateException: MQJMSRA_DS4001: commit():Illegal for a non-transacted Session:sessionId=3252512848414823937
    |#]

    This is my jms config file

    Code:
            <jee:jndi-lookup id="jmsMessageConnectionFactory" jndi-name="jms/MessageConnectionFactory" 
              resource-ref="true" />
    
    	
    	<bean id="jmsContainer"
    		class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    		<property name="concurrentConsumers" value="1" />
    		<property name="connectionFactory" ref="jmsMessageConnectionFactory" />
    		<property name="destinationName" value="MessageQueue" />
    		<property name="messageListener" ref="jmsQueueListener" />
    		<property name="transactionManager" ref="transactionManager" />
    		<property name="sessionTransacted" value="true" />
    		<property name="receiveTimeout" value="5000" />
    		<property name="recoveryInterval" value="6000" />
    		<property name="autoStartup" value="true" />
    	</bean>
    This is my jpa config file

    Code:
            <jee:jndi-lookup id="dataSource" jndi-name="Test" />
    
    	<bean id="entityManagerFactory"
    		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
    		p:packagesToScan="com.pinkshield.jpaTest.domain" 
    		p:jtaDataSource-ref="dataSource"
    		p:jpaPropertyMap-ref="jpaPropertyMap" 
    		p:jpaVendorAdapter-ref="hibernateVendor" />
    
    	<util:map id="jpaPropertyMap">
    		<entry key="hibernate.hbm2ddl.auto" value="validate" />
    		<entry key="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" />
    	    <entry key="hibernate.transaction.jta.platform"value=                                                                       "org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>
    	</util:map>
    
    	<bean id="hibernateVendor"
    		class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
    		p:showSql="true" />
    
    
    	<tx:jta-transaction-manager/>
    	
    	<tx:annotation-driven/>
    Any ideas are welcome.

  • #2
    Sorry for not getting to this sooner. We are in the process of moving to StackOverflow for our forums.

    This question is probably a better candidate for StackOverflow, perhaps against the #spring-jms, #glassfish tag.
    If you do post it there, please reply here with the link.

    Thanks!

    Comment

    Working...
    X