Message-Driven Beans, Message not send / received

Problem:
When sending a message via JMS (transactions enabled) this message is not received by other MessageListener.

Solution:
Add an additional session.commit(); before closing the session.


Further information:
session.close(); will not implicitly invoke session.commit() !
This is probably due to the fact that session.commit() throws an exception if this session was created without transaction support.
e.g.

Note:
This behavior was observed on JBoss AS 6.
As far as I know, parameters to createSession() method should be ignored according to the specifications.
But such implementations are certainly vendor specific.

Share itTweet about this on TwitterEmail this to someoneShare on FacebookShare on Google+

Leave a Reply

Your email address will not be published. Required fields are marked *