On 11 Nov 2005, at 06:22, Peter Smith wrote:

Obvious in hindsight. Thanks very much!

----

My next stumpling block is inside the JmsReceiverComponent:

....
       template.execute(new SessionCallback() {
public Object doInJms(Session session) throws JMSException { Destination defaultDestination = template.getDefaultDestination();
               if (defaultDestination == null) {
defaultDestination = template.getDestinationResolver().resolveDestinationName(session, template.getDefaultDestinationName(), template.isPubSubDomain());
               }
consumer = session.createConsumer (defaultDestination, selector);
               return null;
           }
       }, true);
consumer.setMessageListener(this); // ****** IllegalStateException THROWN FROM HERE ******
....

After reviewing the Spring code, this looks like a mis-use of the JmsTemplate. The execute(SessionCallback()) will close the session after the execute() method finishes :). So you should not use this method to create consumers :)

I've patched the JmsReceiverComponent which should make it into the 2.0.2 release shortly.

James Strachan
Chief Architect
LogicBlaze, Inc. - a Simula Labs Enterprise
[EMAIL PROTECTED]
www.logicblaze.com

Reply via email to