Getting Started with Berkeley DB XML 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/xmloslicense-086890.html

Oracle, Berkeley DB, Berkeley DB XML 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://community.oracle.com/community/database/high_availability/berkeley_db_family/berkeley_db_xml

7/10/2015


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Why Transactions?
Transaction Benefits
A Note on System Failure
Application Requirements
Multi-threaded and Multi-process Applications
Recoverability
Performance Tuning
2. Enabling Transactions
Environments
File Naming
Error Support
Shared Memory Regions
Security Considerations
Opening a Transactional Environment and Container
Opening Berkeley DB Databases
3. Transaction Basics
Committing a Transaction
Non-Durable Transactions
Aborting a Transaction
Auto Commit
Nested Transactions
Using BDB XML Transactions with Berkeley DB Transactions
Configuring the Transaction Subsystem
4. Concurrency
Which BDB XML Handles are Free-Threaded
Locks, Blocks, and Deadlocks
Locks
Blocks
Deadlocks
The Locking Subsystem
Configuring the Locking Subsystem
Configuring Deadlock Detection
Resolving Deadlocks
Setting Transaction Priorities
Isolation
Supported Degrees of Isolation
Reading Uncommitted Data
Committed Reads
Using Snapshot Isolation
Read/Modify/Write
No Wait on Blocks
Explicit Transactions on Reads
5. Managing BDB XML Files
Checkpoints
Backup Procedures
About Unix Copy Utilities
Offline Backups
Hot Backup
Incremental Backups
Recovery Procedures
Normal Recovery
Catastrophic Recovery
Designing Your Application for Recovery
Recovery for Multi-Threaded Applications
Recovery in Multi-Process Applications
Using Hot Failovers
Removing Log Files
Configuring the Logging Subsystem
Setting the Log File Size
Configuring the Logging Region Size
Configuring In-Memory Logging
Setting the In-Memory Log Buffer Size
6. Summary and Examples
Anatomy of a Transactional Application
Transaction Example
Class Overview
TxnGuide.java
InfoKeeper.java
XMLWriter.java
In-Memory Transaction Example
Runtime Analysis
Default Program Run
Varying the Node Size
Using Wholedoc Storage
Using Read Committed Isolation
Read Committed with Wholedoc Storage