JavaのJMS(Java Message Service)の受信側でコールされるMessageListener#onMessage()は、並列して走ることがあるのか調べてみた。
まず、JavaDocを読んでみる。
・・・the onMessage method is not called with the next message until the session has completed the last call.
MessageListener (Java(TM) EE 7 Specification APIs)
これによると、並列して走らないように読める。以下のページにも並列して走らないという記載がある。
MessageListener#onMessage() is executed as part of session thread, so you will not receive next message until return from onMessage().
JMSの仕様として、MessageListener#onMessage()はシーケンシャルになるので、この処理の中では排他は考えなくても大丈夫だと思われる。