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:

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:


Table of Contents

Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Transaction Benefits
A Note on System Failure
Application Requirements
Multi-threaded Applications
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
JE Lock Management
Managing JE Lock Timeouts
Managing Deadlocks and other Lock Conflicts
Supported Degrees of Isolation
Reading Uncommitted Data
Committed Reads
Configuring Serializable Isolation
Transactional Cursors and Concurrent Applications
Using Cursors with Uncommitted Data
5. Backing up and Restoring Berkeley DB, Java Edition Applications
Normal Recovery
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
DPL Transaction Example