Announcement Announcement Module
Collapse
No announcement yet.
JMS MessagingGateway with non transactional receiver Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS MessagingGateway with non transactional receiver

    Hi,

    I am trying to setup a MessageGateway based on a request/reply managed by JMS queues. The setup was not easy at all but I got something (see http://forum.springsource.org/showthread.php?t=82102).

    My problem is the following, the gateway should not be transactional since it will launch a lengthy process (transaction timeout). I tried to setup a DefaultMessageListenerContainer for the chunkReceiver with transacted set to false and no tx manager. Still I get this

    Code:
    2010-02-16 16:18:54 [requestContainer-3] DualSessionWrapper [ERROR] error closing session
    [INFO] [talledLocalContainer] javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.
    [INFO] [talledLocalContainer]   at org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109)
    [INFO] [talledLocalContainer]   at org.apache.activemq.ActiveMQMessageConsumer.acknowledge(ActiveMQMessageConsumer.java:837)
    [INFO] [talledLocalContainer]   at org.apache.activemq.ActiveMQMessageConsumer.dispose(ActiveMQMessageConsumer.java:658)
    [INFO] [talledLocalContainer]   at org.apache.activemq.ActiveMQSession.dispose(ActiveMQSession.java:575)
    [INFO] [talledLocalContainer]   at org.apache.activemq.ActiveMQSession.close(ActiveMQSession.java:547)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.jms.DualSessionWrapper.stateChanged(DualSessionWrapper.java:166)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.common.AbstractXAStatefulHolder.fireStateChanged(AbstractXAStatefulHolder.java:72)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.common.AbstractXAStatefulHolder.setState(AbstractXAStatefulHolder.java:43)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.jms.DualSessionWrapper.stateChanged(DualSessionWrapper.java:149)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.common.AbstractXAStatefulHolder.fireStateChanged(AbstractXAStatefulHolder.java:72)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.common.AbstractXAStatefulHolder.setState(AbstractXAStatefulHolder.java:43)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.common.TransactionContextHelper.requeue(TransactionContextHelper.java:115)
    [INFO] [talledLocalContainer]   at bitronix.tm.resource.jms.DualSessionWrapper.close(DualSessionWrapper.java:132)
    [INFO] [talledLocalContainer]   at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:108)
    [INFO] [talledLocalContainer]   at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1020)
    [INFO] [talledLocalContainer]   at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:887)
    [INFO] [talledLocalContainer]   at java.lang.Thread.run(Thread.java:595)
    I don't want to have two different connection factories for all this. I just want one connectionFactory and use a mixed of transactional/ non transctional MDBs (in different message listener container of course).

    any idea?
Working...
X