Taken from the J2EE JMS tutorial:
"... Like a stateless session bean, a message-driven bean can have many interchangeable instances running at the same time. The container can pool these instances to allow streams of messages to be processed concurrently. Concurrency can affect the order in which messages are delivered, so you should write your application to handle messages that arrive out of sequence...."
Looks like you don't have much choice other than implementing your own message sequence mechanism.
One way of fixing this problem is to reduce the max number of session the MDB uses to 1.
I wanted to do that, but I didn't see how to easily set that in the jboss.xml. Do you know of a way?
According to the JMS spec. there is no guarantee of the sequence of delivery. So a MDB has to expect that a message arrives out of sequece.