Java Transaction Processing Design and Implementation

by ; ;
Edition: 1st
Format: Paperback
Pub. Date: 2004-06-25
Publisher(s): Prentice Hall
  • Free Shipping Icon

    This Item Qualifies for Free Shipping!*

    *Excludes marketplace orders.

List Price: $57.74

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

Provides a comprehensive explanation of J2EE and Java from a transactional perspective--needed to exploit the technology correctly.

Author Biography

DR. MARK LITTLE, Chief Architect, Transactions for Arjuna Technologies, was formerly Distinguished Engineer and Architect at HP. There, he led the teams developing J2EE and Web services transactions products. He is specification lead for JSR 156: Java API for XML Transactions, and was transactions architect for Bluestone. JONATHAN MARON, Consultant Member of Technical Staff at Oracle, specializes in transactional Java middleware. As Principal Architect for HP's Application Server, he helped implement most of the infrastructure discussed in this book. GREG PAVLIK, Consultant Member of Technical Staff at Oracle, specializes in web services and transactional middleware. A former Distinguished Engineer at HP, he was Chief Architect for HP's Application Server Division.



013035290XAB07232004

Table of Contents

Foreword by Steven G. Harris xix
Foreword by Eric Newcomer xxi
Preface xxv
Acknowledgments xxxv
Part 1 Java Transactions Fundamentals
Chapter 1 Transactions Fundamentals
3(60)
What Are Transactions and Why Do I Need Them?
4(12)
Atomicity
7(2)
Consistency
9(1)
Isolation (Serializability)
9(5)
Two-Phase Concurrency Control
10(1)
Optimistic Versus Pessimistic Concurrency Control
11(1)
Type-Specific Concurrency Control
12(1)
Deadlock Detection and Prevention
13(1)
Durability
14(1)
Services and Participants
14(2)
Two-Phase Commit Optimizations
16(3)
Synchronizations
19(2)
Heuristic Transactions
21(3)
The Transaction Log
24(2)
Failure Recovery
26(4)
Trust Implications
30(2)
Types of Transactions
32(4)
Nested Transactions
32(2)
Independent Top-Level Transactions
34(1)
Concurrent Transactions
35(1)
Glued Transactions
36(1)
Distributed Transactions
36(4)
The Transaction Context
37(1)
Interposition
38(2)
Controlling a Transaction
40(4)
Transactions and Threads
44(3)
Checked Transactions
44(3)
Suspending and Resuming Transactionality
47(1)
Transactions and Queues
47(3)
Transactions and Replication
50(8)
Maintaining Information on Persistent Objects
51(1)
Replication Protocols
52(2)
Integrating Replication and Transactions
54(2)
Availability Measures in Current Application Servers
56(2)
Transaction Processing Monitors
58(1)
Transactions and Workflow
58(3)
Summary
61(2)
Chapter 2 Foundation of Transactions in J2EE: The Java Transaction API
63(32)
What Is the DTP?
64(4)
Java Transaction API
68(12)
Application Level Transaction Management in Java
69(1)
UserTransaction Interface
69(3)
TransactionManager Interface
72(3)
Suspending and Resuming a Transaction
73(2)
Transaction Interface
75(3)
Transaction Status
76(1)
Resource Enlistment
77(1)
Transaction Synchronization
78(1)
JTA-DTP Discrepancies
79(1)
Transaction Manager to Resource Manager Interfaces
80(4)
XID Interface
80(1)
XAResource Interface
81(5)
Thread of Control
82(1)
Transaction Association
83(1)
Opening a Resource Manager
84(1)
Closing a Resource Manager
84(1)
Putting the JTA APIs Together
84(2)
Architectural Considerations
86(8)
Failure Recovery
86(2)
Tree of Process Model
88(1)
Transaction Interoperability
89(3)
Protocol Bridges
92(1)
Last Resource Commit
92(2)
Conclusion
94(1)
Chapter 3 The Java Transaction Service
95(58)
The OTS in a Nutshell
97(1)
The Java Transaction Service
98(1)
Relationship to Other Transaction Standards
98(1)
The OTS Architecture
99(32)
Application Programming Models
100(2)
The Transaction Factory
102(1)
Managing Transaction Contexts
103(3)
Nested Transactions
106(1)
Transaction Propagation
107(2)
Transactional Object Interface
108(1)
OTS Policy
108(1)
Examples
109(1)
Handling Heuristics
110(1)
Transaction Controls
111(4)
The Terminator
112(1)
The Coordinator
113(2)
Current
115(3)
Participating in an OTS Transaction
118(15)
Resource
118(4)
SubtransactionAwareResource
122(2)
Synchronization
124(1)
Participant Relationships
125(1)
Transactions and Registered Resources
126(2)
The RecoveryCoordinator
128(2)
Interposition
130(1)
Shared and Unshared Transactions
131(1)
Checked Transaction Behavior
131(1)
Transaction Interoperability
132(1)
Writing Applications Using OTS Interfaces
133(14)
Transaction Context Management
134(1)
A Transaction Originator: Indirect Context Management and Implicit Propagation
134(1)
Transaction Originator: Direct Context Management and Explicit Propagation
135(1)
Implementing a Recoverable Server
135(6)
Transactional Object
136(1)
Resource Object
137(1)
An Example of a Recoverable Server
137(3)
Example of a Transactional Object
140(1)
Worked Example
141(13)
Resource
142(1)
Transactional Implementation
143(1)
Server Implementation
143(2)
Client Implementation
145(1)
Sequence Diagram
146(1)
Choosing an OTS Implementation
147(2)
Summary
149(4)
Part 2 Transactions in J2EE
Chapter 4 JDBC and Transactions
153(32)
The Basic JDBC Model
154(6)
java.sgl.Connection
154(5)
Types of JDBC Drivers
159(1)
Transaction Isolation Levels
160(4)
Implications of Relaxed Isolation
161(1)
Dirty Reads
161(1)
Non-repeatable Reads
162(1)
Phantom Reads
162(1)
Isolation Constraints
162(4)
TRANSACTION_ NONE
163(1)
TRANSACTION READ_UNCOMMITTED
163(1)
TRANSACTION_READ_COMMITED
163(1)
TRANSACTION_REPEATABLE_READ
164(1)
TRANSACTIONSERIALIZABLE
164(1)
Local Transactions
164(2)
JDBC 2.0 Advanced Features
166(1)
Batch Updates
166(1)
Updateable Result Sets
167(1)
Distributed Transactions
167(16)
XADataSource and XAConnection Interfaces
169(1)
XAResource Interface
170(3)
Connection Management
173(10)
Summary
183(2)
Chapter 5 JMS and Transactions
185(22)
What Is Message-Oriented Middleware?
185(3)
Java Message Service
188(2)
Message Acknowledgement
190(2)
AUTO ACKNOWLEDGE Mode
190(1)
DUPS_OK_ACKNOWLEDGE Mode
191(1)
CLIENT ACKNOWLEDGE Mode
191(1)
JMS Local Transactions
192(3)
JMS 1.1 Improvements
195(1)
Global Transactions
195(4)
XAConnectionFactory
196(1)
XAConnection
197(1)
XASession
197(2)
Application Server Integration
199(3)
Example Application
202(3)
Summary
205(2)
Chapter 6 Enterprise JavaBeans and Transactions
207(30)
What Are EJBs?
207(28)
Transaction Support
210(17)
Container-Managed Transactions
211(3)
Specifying Container-Managed Transactions
214(1)
Bean-Managed Transactions
215(2)
BMT vs. CMT
217(1)
Error Handling
217(4)
Bean Types and Transactions
221(3)
Optimistic Locking
224(1)
Pessimistic Locking
225(1)
Commit Options
226(1)
Isolation Levels
226(1)
Message-Driven Beans
227(2)
Managing MDB Transactions
229(2)
Bean-Managed Transactions
229(2)
Container-Managed Transactions
231(1)
Transaction Context Propagation
231(4)
Summary
235(2)
Chapter 7 J2EE Connector Architecture and Transactions
237(22)
Enterprise Application Integration
238(1)
Integration Servers
238(1)
Web Services
239(1)
Inside J2C
239(6)
CCI
240(3)
javax. resource.cci.Connection
240(1)
javax.resource.cci.ConnectionFactory
241(1)
javax. resource.cci.Record
241(1)
javax. resource. cci.Interaction
241(1)
javax. resource. cci.InteractionSpec
242(1)
CCI Example
242(1)
SPI
243(4)
javax. resource.spi.ManagedConnection
244(1)
javax.resource.spi.ManagedConnectionFactory
244(1)
Connection Management
245(2)
Transaction Management
247(6)
No Transaction
247(1)
Local Transactions
247(4)
SPI LocalTransaction Interface
247(1)
CCI LocalTransaction Interface
248(2)
Sample Scenario
250(1)
Distributed Transactions
251(2)
J2C Futures
253(2)
Summary
255(4)
Part 3 The Future of Transactions in J2EE and Web Services
Chapter 8 Advanced Transaction Concepts
259(22)
Is Java Suitable for High Performance Transaction Systems?
259(6)
Compiled versus Interpreted
260(1)
The Web-Effect on Transaction Systems
261(4)
Java and E-commerce
262(1)
The 100% Solution
262(3)
Conclusion
265(1)
End-to-End Transactional Guarantees
265(9)
End-to-End Transactions and the New Generation of Transaction Systems
268(1)
Is End-to-End Transactionality Possible at All?
268(2)
Online Transaction Processing versus Object-Oriented Transaction Processing
270(1)
The OTS and End-to-End Transactionality
271(1)
The CORBA Effect
272(1)
The J2EE Effect
272(1)
Application Servers and Thin Clients
273(1)
Conclusions
273(1)
The Usefulness of Interposition
274(3)
The Universal Adapter
274(3)
Object Decomposition to Improve Throughput
277(2)
Summary
279(2)
Chapter 9 The J2EE Activity Service
281(24)
When ACID Is Too Strong
281(4)
The Proposed J2EE Solution
285(2)
Activities, Participants and Coordination
287(1)
Relationship to the J2EE Architecture
288(1)
Coordinating Activities
289(1)
The High-Level Service (HLS)
290(6)
Actions, SignalSets and Signals
290(2)
SignalSets
292(4)
Example Extended Transaction Models
296(5)
Two-Phase Commit
296(1)
Nested Top-Level Transactions with Compensations
297(2)
Workflow Coordination
299(2)
Where Do I Get an Activity Service?
301(1)
Summary
302(3)
Chapter 10 Transactions and Web Services
305(56)
Some Common Features of Web Services Transactions
306(3)
Obtaining Consensus
306(1)
General Architecture
307(2)
The OASIS Business Transactions Protocol
309(12)
Open-Top Coordination
309(1)
Atoms and Cohesions
310(1)
XML Message Sets and Carrier Bindings
311(2)
Participants
313(1)
The Composer
313(1)
Roles in BTP
314(1)
Optimizations
315(2)
One-shot
315(1)
Resignation by a Participant
316(1)
Spontaneous Prepare
316(1)
Autonomous decision by a participant
316(1)
Qualifiers
317(1)
Using BTP
317(4)
Web Services Coordination and Transactions
321(11)
WS-Transaction Models
324(8)
Atomic Transaction
324(4)
Business Activity
328(3)
Example of Using Business Activities
331(1)
The API
332(1)
The Web Services Composite Application Framework
332(12)
The Context Service
333(2)
The Coordination Framework
335(1)
The Transaction Models
336(8)
Long-Running Activities
336(4)
Business Process Model
340(4)
The API
344(1)
Which Specification?
344(2)
Java API for XML Transactions (JAXTX)
346(13)
JAXTX Architecture
347(1)
The Components
348(1)
XML Configuration
349(1)
The API
350(18)
Transaction Termination State
350(2)
Current Transaction Status
352(1)
The Result of a Transaction
353(1)
Demarcating Client-Side Transactions
354(2)
Controlling Server-Side Transactions
356(1)
Transaction Model-Specific APIs
357(2)
Summary
359(2)
Appendix A Resources 361(6)
Transactional J2EE/J2SE Specifications
361(2)
Java 2 Plaform, Enterprise Edition (J2EE) Specification 1.4
361(1)
The Java Transaction API (JTA) Specification 1.0./B
361(1)
The Java Transaction Service (JTS) Specification 1.0
361(1)
The JDBC Specifications, 3.0, 2.1, and Optional Package API 2.0
362(1)
Java Message Service (JMS) Specification 1.1
362(1)
Enterprise JavaBeans (EJB) Specification 2.1
362(1)
J2EE Connector (JCA) Specification 1.5
362(1)
Java API for XML Transactions
362(1)
J2EE Activity Service for Extended Transactions
362(1)
Transactional Web Services Specifications
363(1)
Web Services Composite Application Framework (WS-CAF) 1.0
363(1)
Web Services Transaction (WS-Transaction)
363(1)
Web Services Coordination (WS-Coordination)
363(1)
Web Services Choreography (WS-C)
363(1)
Business Process Execution Language for Web Services Version 1.1
364(1)
BTP Committee Specification
364(1)
Other Transaction-Related Specifications
364(1)
Object Transaction Service (OTS) Specification 1.3
364(1)
Additional Structuring Mechanisms for the OTS, version 1.0
364(1)
Distributed TP: The XA Specification
364(1)
Distributed TP: The TX (Transaction Demarcation) Specification
364(1)
Distributed TP: Reference Model, Version 3
364(1)
Books
365(1)
Articles
365(2)
Appendix B Experiences Gained and Lessons Learned 367(12)
Commercial Implementations versus Open-Source
367(8)
Questions to Consider
368(4)
Development Background
368(1)
Performance
368(1)
Fault Tolerance
369(1)
Two-Phase Commit
369(1)
Reliability Characteristics
369(1)
Support for Nested Transactions
370(1)
Support for Arbitrary Participants
370(1)
Quality Assurance
370(3341)
Distributed Transactions
3711
Management Support
371(1)
Pedigree
371(1)
Support for Web Services Transactions
371(1)
Cost
371(1)
Openness
372(1)
Support for Multi-Threading
372(1)
Summary
372(1)
Catalog of Transaction System Implementations
372(3)
Commercial Implementations
373(1)
Open-Source Implementations
374(1)
Experiences of Choosing a Transaction Service
375(3)
Build versus Buy
375(1)
Underestimating Your Requirements
376(1)
Choosing the Right Implementation
377(1)
Down and Out
378(1)
Summary
378(1)
Appendix C A Brief History of Transaction Systems 379(4)
CICS
379(1)
Tuxedo
379(1)
The Hewlett-Packard Transaction Service (HP-TS)
379(1)
Ent-ma
380(1)
X/Open
380(1)
The Object Transaction Service (OTS)
381(2)
Appendix D Glossary of Terms 383(6)
Index 389

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.