views:

8

answers:

0

I'm trying to use DistributedTxMessageListenerContainer to receive messages from a queue but without any success. If I replace the DistributedTxMessageListenerContainer by a TransactionalMessageListenerContainer I do receive messages. What am I doing wrong here?

Configuration:

<!-- MSMQ Configuration -->
<object id='ExamSessionAccessCodeQueue' 
        type='Spring.Messaging.Support.MessageQueueFactoryObject
              , Spring.Messaging'>
  <property name='Path' value='.\Private$\EdumaticExam'/>
  <property name='MessageReadPropertyFilterSetAll' value='true'/>
</object>
<!-- Configuration used to read messages from queue -->
<object id="messageQueueTransactionManager" 
        type="Spring.Messaging.Core.MessageQueueTransactionManager
              , Spring.Messaging"/>
<object id="transactionalMessageListenerContainer" 
        type="Spring.Messaging.Listener.TransactionalMessageListenerContainer
              , Spring.Messaging">
<!--<object id="transactionalMessageListenerContainer" 
      type="Spring.Messaging.Listener.DistributedTxMessageListenerContainer
            , Spring.Messaging">-->
  <property name="MessageQueueObjectName" value="ExamSessionAccessCodeQueue"/>
  <property name="PlatformTransactionManager" 
            ref="messageQueueTransactionManager"/>
  <property name="MaxConcurrentListeners" value="10"/>
  <property name="MessageListener" ref="messageListenerAdapter"/>
</object>
<object id="messageListenerAdapter" 
        type="Spring.Messaging.Listener.MessageListenerAdapter
              , Spring.Messaging">
  <property name="HandlerObject" ref="examSessionsAccessCodeHandler"/>
  <property name="DefaultHandlerMethod" value="HandleObject"/>
</object>
<object id="examSessionsAccessCodeHandler" 
        type="ReceiveMessageApplication.ExamSessionAccessCodeHandler"/>