Robin Van Praet created AMQ-6351: ------------------------------------ Summary: A message must not be dispatched until 2P commit is completed Key: AMQ-6351 URL: https://issues.apache.org/jira/browse/AMQ-6351 Project: ActiveMQ Issue Type: Bug Affects Versions: 5.12.3 Reporter: Robin Van Praet
h4. Context In an environment with a JTA transactionmanager using 2 phase commit the following occurs: In a jta transaction a jpa entity is created and stored to the database. In the same transaction a JMS producer produced a message and sent it to the broker. When the transaction is committed, the broker will store the message in the database (and commit) during the prepare stage. It will update the message during the commit stage. At that time, the message is also dispatched to the consumer. The consumer receives the message and tries to read the jpa entity that was created in the first transaction. h4. Expected result The consumer can read the jpa entity as the original transaction should be committed h4. Actual result The consumer cannot always read the jpa entity as the original transaction is still in process of committing all data to all XA resources. h4. Todo The message dispatch must be absolutely sure that the original transaction has been committed completely. -- This message was sent by Atlassian JIRA (v6.3.4#6332)