InfoQ

Minibook

Java Transaction Design Strategies

Posted by Mark Richards on May 14, 2006 11:03 PM

Community
Java
Topics
Transactions Processing
Tags
Spring ,
Design Patterns ,
EJB ,
JDBC

Java Transactions Book Free Downloadable PDF

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)

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.

Educational Content

JRuby: The Pain of Bringing an Off-Platform Dynamic Language to the JVM

Charles Nutter discusses bringing JRuby to the JVM, why Ruby is hard to implement, JIT compilation, precompilation, core Ruby implementation, Java library access, library challenges and future plans.

Performance Anti-Patterns in Database-Driven Applications

Alois Reitbauer specifies several architectural anti-patterns that one should stay away from and which can downgrade an application’s performance.

Making TDD Stick: Problems and Solutions for Adopters

Teams in large organizations still struggle to adopt TDD. In this article Mark Levison shares problems he uncovered when he surveyed teams, and his own strategy to introduce TDD into an organization.

Testing is Overrated

In this talk from RubyFringe, Luke Francl asks: is developer-driven testing really the best way to find software defects? Or is the emphasis on testing and test coverage barking up the wrong tree?

VM Optimizations for Language Designers

John Pampuch discusses the HotSpot compiler, the history of Java performance, HotSpot development philosophies and challenges, optimization, JVM library improvements, and tips for better performance.

Keith Braithwaite, an Agile Skeptic

In this interview, Keith Braithwaite, an Agile developer, consultant and trainer, says that we should show a good deal of skepticism towards today’s Agile practice.

Workflow Orchestration Using Spring AOP and AspectJ

This article demonstrates how to build and orchestrate highly configurable and extensible yet light-weight embedded process flow using AOP techniques with Spring AOP and Aspect J.

Embrace Uncertainty

Jeff Patton explains why one needs to embrace uncertainty in order to succeed with his/her Agile project and how to avoid some of the common mistakes leading to project failure.