Chapter 14. Nontransactional Access
Transactional management of persistent data is a core feature of JDO. Using transactions helps guarantee the consistency of data in the datastore. However, there are many cases where transactional consistency is not important to the application. Data that is known to be relatively static can be used outside of a transaction without harm. For example, having the most up-to-date description of movies in the Media Mania datastore isn’t critical to the integrity of the database.
Using nontransactional data may make your application perform better, because you don’t need to begin and complete transactions in order to access the persistent data in the datastore. This is especially noticeable when the application is in one process and the datastore is in a different process. Beginning and completing transactions often require one or more messages to be passed from one process to the other, in addition to the messages to retrieve the data itself. Avoiding transactions in this environment results in fewer messages.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access