I have a strange phenomenon that jms messages seem to be sent before the data collection actually happened.
Suppose I have a server operation foo () that sends a message to the client when it is complete. The client then downloads the changed data from the server. Now it seems that the jms message was sent before the commit was actually completed, so the client is still receiving the old data, because its request is still up to the end of the initial commit.
The whole server operation is definitely transactional, because if an exception is thrown, the jms event is not dispatched.
Is there any requirement in the jms specification that needs to happen first for all database transactions and then send a jms message, or does it depend on the implementation, in what order does this happen?
We are talking about the default implementation of hornetq in jboss 6.0.0.Final.
Update:
It seems I have the same problem as these guys: http://techstack.com/forum/websphere/34434-order-commits-xa-transaction.html
Update 2:
Another user with the same problem http://community.jboss.org/message/114459
Mauli source share