Product overview >
Transaction processing overview
WebSphere eXtreme Scale uses transactions as its mechanism for interaction with data.
To interact with data, the thread in the application needs its own session. When the application wants to use the ObjectGrid on a thread, call one of the ObjectGrid.getSession methods to obtain a thread. With the session, the application can work with data that is stored in the ObjectGrid maps.
When an application uses a Session object, the session must be in the context of a transaction. A transaction begins and commits or begins and rolls back using the begin, commit, and rollback methods on the Session object. Applications can also work in auto-commit mode, in which the Session automatically begins and commits a transaction whenever an operation is performed on the map. Auto-commit mode cannot group multiple operations into a single transaction, so it is the slower option if you are creating a batch of multiple operations into a single transaction. However, for transactions that contain only one operation, auto-commit is the faster option.
Transactions have many advantages for data storage and manipulation. Use transactions to protect the data grid from concurrent changes, to apply multiple changes as a concurrent unit, to replicate data and to implement a life cycle for locks on changes.
- CopyMode attribute
You can tune the number of copies by defining the CopyMode attribute of the BackingMap or ObjectMap objects.
- Map entry locking
An ObjectGrid BackingMap supports several locking strategies for maps to maintain cache entry consistency.
- Locking strategies
Locking strategies include pessimistic, optimistic and none.
To choose a locking strategy, consider issues such as the percentage of each type of operations you have, whether or not you use a loader and so on.
- Distribute transactions
Use Java Message Service (JMS) for distributed transaction changes between different tiers or in environments on mixed platforms.
- Single-partition and cross-data-grid transactions
The major distinction between WebSphere eXtreme Scale and traditional data storage solutions like relational databases or in-memory databases is the use of partitioning, which allows the cache to scale linearly. The important types of transactions to consider are single-partition and every-partition (cross-data-grid) transactions.
WebSphere eXtreme Scale overview
Cache integration overview
REST data services overview
Tutorials, examples, and samples
Program for transactions
Configure a locking strategy