WebSphere eXtreme Scale Product Overview >



Transaction processing


WebSphere eXtreme Scale uses transactions as its mechanism for interaction with data.


Sessions and transactions

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.


Advantages of transactions

By using transactions, you can:


+

Search Tips   |   Advanced Search