Java Transaction Design Strategies
Posted by
Mark Richards
on
May 14, 2006 11:03 PM
- Java
- Topics
-
Transactions Processing
- Tags
-
Spring
,
-
Design Patterns
,
-
EJB
,
-
JDBC

Understanding how transaction management works in Java and developing an effective transaction design strategy can help to avoid data integrity problems in your applications and databases and ease the pain of inevitable system failures.
This book is about how to design an effective transaction management strategy using the transaction models provided by Java-based frameworks such as EJB and Spring. Techniques, best practices, and pitfalls with each transaction model will be described. In addition, transaction design patterns will bring all these concepts and techniques together and describe how to use these models to effectively manage transactions within your EJB or Spring-based Java applications.
Free download, buy the print version for $22.95
If you enjoyed reading the free downloadable version, please support the author as well as future InfoQ books by
purchasing the print copy for only $22.95 or
Login to download this book FREE (PDF)
Download this book FREE (PDF)
Table of Contents
Introduction
- Transaction Models
- Where’s the ACID, Man?
- JTA and JTS
- UserTransaction Interface
- TransactionManager Interface
- EJBContext Interface
- Status Interface
The Local Transaction Model
- Auto Commit and Connection Management
- Local Transaction Considerations and Limitations
The Programmatic TransactionModel
- Obtaining a Reference to the
- JTA UserTransaction
- Programmatic Transaction Coding Traps
- The Transaction Context Problem
- Programmatic Transaction Scenarios
The Declarative Transaction Model
- Transaction Attributes
- Specifying Transaction Attributes
- Exception Handling and thesetRollback() Method
- EJB 3.0 Considerations
- setRollbackOnly() Alternative
- Using Required vs. Mandatory
- Transaction Attributes
- The Reality of Transaction Isolation Levels
XA Transaction Processing
- The XA Interface Explained
- When Should You Use XA?
- Two-Phase Commit
- Heuristic Exception Processing
- Enabling Queues and Topics for XA
- Enabling Databases for XA
Client Owner Transaction Design Pattern
Domain Service Owner Transaction Design Pattern
Server Delegate Owner Transaction Design Pattern
About the author
Mark Richards is Certified Senior IT Architect at IBM, where he is involved in the architecture and design of large-scale Service Oriented Architectures in J2EE and other technologies, primarily in the financial services industry. He has been involved in the software industry as a developer, designer, and architect since 1984, speaks frequently at the No Fluff Just Stuff Symposiums and holds a Masters Degree in Computer Science from Boston University, and holds a number of Sun, IBM, and BEA Java and architect certifications. Feel free to
email Mark with any comments or questions about the book.
About the InfoQ Enterprise Software Development Series
Books on InfoQ are intentionally short and attempt to address important, timely issues in as concise a way as possible. The book's writing is intended for the Senior Architect/team lead audience. Ever thought of writing a book? Our series is a great way to start. InfoQ offers abnormally high royalties and also contract writing opportunities. Email books AT c4media.com for opportunities.