users@glassfish.java.net

Re: Message Driven Bean receives messages at the same time, transaction

From: <glassfish_at_javadesktop.org>
Date: Mon, 03 May 2010 07:01:24 PDT

The MDB container was designed for efficient concurrent message delivery. The transactional nature of an onMessage method only applies to the activity for a particular bean instance. Just like the stateless session bean container, there are typically many bean instances in use at one time. The EJB specification states that the container does not preserve ordering of messages. That is typically a concern that should be handled at the application level. However, some vendors do support the ability to force all messages to flow through a single message bean instance. In GlassFish this can be achieved by setting the MDB's max pool size element to 1 in sun-ejb-jar.xml.
[Message sent by forum member 'ksak']

http://forums.java.net/jive/thread.jspa?messageID=400175