activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JS75 <jean...@aboveE.com>
Subject Cannot synchronously receive a message when a MessageListener is set
Date Fri, 18 Jan 2008 01:46:02 GMT

Dear All:
I tried to receive message from topic, however, I got exception below.
     [java]      [java] javax.jms.IllegalStateException: Cannot
synchronously receive a message when a MessageListener is set
     [java]      [java]         at
org.apache.activemq.ActiveMQSession.checkMessageListener(ActiveMQSession.java:1723)
     [java]      [java]         at
org.apache.activemq.ActiveMQMessageConsumer.checkMessageListener(ActiveMQMessageConsumer.java:631)
     [java]      [java]         at
org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:468)

In my code, I initital a topic subsrciber to receive a message and set it
with one message listener.
subscriber.setMessageListener(ml);  // ml is the message listener

I have no idea why throws this exception..

Sincerely,
Jean
-- 
View this message in context: http://www.nabble.com/Cannot-synchronously-receive-a-message-when-a-MessageListener-is-set-tp14943747s2354p14943747.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message