Book Image

Infinispan data grid platform definitive guide

Book Image

Infinispan data grid platform definitive guide

Overview of this book

Table of Contents (20 chapters)
Infinispan Data Grid Platform Definitive Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Transaction fundamentals


Before we start to learn how Infinispan deals with transactions, let's learn the basics about transactions in order to extract the best from this feature.

By definition, a transaction allows you to set the boundaries of a user-defined series of logically related read or write operations (get() or put()). All changes brought by a write operation (update, remove, or add an entry in the cache) are either undone or made permanent at the same time.

The processing of these transactions is divided into individual, atomic operations and might help you isolate one transaction from another transaction in a multiuser application. Each transaction at the end must complete the processing with success or failure as a complete unit, and a transaction should not complete the processing in an intermediate state.

To execute all your data grid operations inside a transaction, you have to mark the boundaries of that transaction. You must start the transaction and at some point commit the...