Getting Started with Berkeley DB, Java Edition Transaction Processing

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html

Oracle, Berkeley DB, Berkeley DB Java Edition and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

Java™ and all Java-based marks are a trademark or registered trademark of Sun Microsystems, Inc, in the United States and other countries.

Other names may be trademarks of their respective owners.

To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: https://forums.oracle.com/forums/forum.jspa?forumID=273

7/25/2014


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Transaction Benefits
A Note on System Failure
Application Requirements
Multi-threaded Applications
Recoverability
Performance Tuning
2. Enabling Transactions
Opening a Transactional Environment and Store or Database
3. Transaction Basics
Committing a Transaction
Non-Durable Transactions
Aborting a Transaction
Auto Commit
Transactional Cursors
Using Transactional DPL Cursors
Secondary Indices with Transaction Applications
Configuring the Transaction Subsystem
4. Concurrency
Which JE Handles are Free-Threaded
Locks, Blocks, and Deadlocks
Locks
Blocks
Deadlocks
JE Lock Management
Managing JE Lock Timeouts
Managing Deadlocks and other Lock Conflicts
Isolation
Supported Degrees of Isolation
Reading Uncommitted Data
Committed Reads
Configuring Serializable Isolation
Transactional Cursors and Concurrent Applications
Using Cursors with Uncommitted Data
Read/Modify/Write
5. Backing up and Restoring Berkeley DB, Java Edition Applications
Normal Recovery
Checkpoints
Performing Backups
Performing a Hot Backup
Performing an Offline Backup
Using the DbBackup Helper Class
Performing Catastrophic Recovery
Hot Failover
6. Summary and Examples
Anatomy of a Transactional Application
Base API Transaction Example
TxnGuide.java
PayloadData.java
DBWriter.java
DPL Transaction Example
TxnGuide.java
PayloadDataEntity.java
StoreWriter.java