JMS--ACTIVEMQ supports two kinds of transactions __JMS

Source: Internet
Author: User
Tags rollback

Reprint please indicate the source: http://blog.csdn.net/l1028386804/article/details/75246853

ACTIVEMQ has support for both transactions, JMS transactions-the commit ()/rollback () methods on a session (which are like doing commit ()/Rollbac K () on a JDBC connection) XA Transactions-where The xasession acts as a XAResource by communicating and the message Br Oker, rather like a JDBC Connection takes place in an XA transaction through communicating with the database.

In a session that supports transactions, producer sends messages with a transaction ID in the message. Broker receives the message to determine if there is a transaction ID, and if so, keep it in the transaction store and wait for a commit or rollback. So ACTIVEMQ transactions are for broker rather than producer, and whether the session is Commit,broker will receive a message.

If the producer Send mode chooses persistent, the message expires and enters the death queue. Before the message enters the death queue, ACTIVEMQ deletes the transaction ID in the message so that the expired message is not in the transaction, is not saved in the transaction store, and goes directly to the death queue. The exact deletion of the transaction ID is in the

Org.apache.activemq.util.BrokerSupport Doresend, the transaction ID is saved in Originaltransactionid, and the transaction ID is deleted

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.