MessageListener interface strictly define behavior of listeners in 
multithreaded environment 
(http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageListener.html). Session 
should serialize dispatching of messages to listener, so you don't need any 
additional synchronization primitives over MessageListener. But you should not 
register one MessageListener in several Sessions at the same time.

Denis Bazhenov



On Apr 10, 2010, at 12:30 AM, frbo wrote:

> I wonder: should I make use a 'synchronized' version for the collections
> that are accessed in the 'onMessage' t

Reply via email to