below is an excerpt from the book "ActiveMQ in action"... The JMS spec specifically defines concurrency for various objects in the JMS API and requires that only a few objects support concurrent access. The ConnectionFactory, Connection and Destination objects are required to support concurrent access while the Session, the MessageProducer and the MessageConsumer objects do not support concurrent access. The point is that the Session, the MessageProducer and the MessageConsumer objects should not be shared across threads in a Java application.
However, the the examples that come with ActiveMQ CPP... the onMessage function uses the session, consumer objects. I think the onMessage would be called in seperate threads for each message in the queue. So given that session and consumer classes are not threadsafe...is it correct to do so? thanks Nishant -- View this message in context: http://www.nabble.com/CMS-and-Multithreading-tp23333314p23333314.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.