Apr 18th, 2010, 09:38 PM
DefaultMessageListenerContainer and temporary queues
I have scoured the spring forums for a hint on how to implement the following to no avail:
I have a message listener class that I want to inject into the DMLC. I assume that the way this works is that spring will attach new instances of this bean to a pool of sessions each time the onMessage() class is called in my class.
I want this pool of POJOs to listen asynchronously on a queue that is not know until runtime (the queue is a temporary queue).
All the examples, e.g. http://forum.springsource.org/showthread.php?t=63270 speak of synchonous receives but none do this asynchronously.
My config looks something like this:
<bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
<property name="connectionFactory" ref="cachedConnectionFactory"/>
<property name="messageListener" ref="testClient" />
<property name="destinationResolver" ref="testClient" />
where testClient implements bot MessageListener and DestinationResolver but when I run my client, it does not get any messages.
First, am I asking the right question - is it possible to have a pool of POJO's inside a DMLC listen/receive asynchonously.?
If so, can anyone provide code/ config examples for this?