activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Bazhenov <bazhe...@farpost.com>
Subject Re: onMessage() called by multiple threads - synchronization needed?
Date Sat, 10 Apr 2010 04:26:22 GMT
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


Mime
View raw message