| 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) |
|
|
|
7 | (2) |
|
|
|
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) |
|
|
|
14 | (1) |
|
Services and Participants |
|
|
14 | (2) |
|
Two-Phase Commit Optimizations |
|
|
16 | (3) |
|
|
|
19 | (2) |
|
|
|
21 | (3) |
|
|
|
24 | (2) |
|
|
|
26 | (4) |
|
|
|
30 | (2) |
|
|
|
32 | (4) |
|
|
|
32 | (2) |
|
Independent Top-Level Transactions |
|
|
34 | (1) |
|
|
|
35 | (1) |
|
|
|
36 | (1) |
|
|
|
36 | (4) |
|
|
|
37 | (1) |
|
|
|
38 | (2) |
|
Controlling a Transaction |
|
|
40 | (4) |
|
|
|
44 | (3) |
|
|
|
44 | (3) |
|
Suspending and Resuming Transactionality |
|
|
47 | (1) |
|
|
|
47 | (3) |
|
Transactions and Replication |
|
|
50 | (8) |
|
Maintaining Information on Persistent Objects |
|
|
51 | (1) |
|
|
|
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) |
|
|
|
61 | (2) |
|
Chapter 2 Foundation of Transactions in J2EE: The Java Transaction API |
|
|
63 | (32) |
|
|
|
64 | (4) |
|
|
|
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) |
|
|
|
75 | (3) |
|
|
|
76 | (1) |
|
|
|
77 | (1) |
|
Transaction Synchronization |
|
|
78 | (1) |
|
|
|
79 | (1) |
|
Transaction Manager to Resource Manager Interfaces |
|
|
80 | (4) |
|
|
|
80 | (1) |
|
|
|
81 | (5) |
|
|
|
82 | (1) |
|
|
|
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) |
|
|
|
86 | (2) |
|
|
|
88 | (1) |
|
Transaction Interoperability |
|
|
89 | (3) |
|
|
|
92 | (1) |
|
|
|
92 | (2) |
|
|
|
94 | (1) |
|
Chapter 3 The Java Transaction Service |
|
|
95 | (58) |
|
|
|
97 | (1) |
|
The Java Transaction Service |
|
|
98 | (1) |
|
Relationship to Other Transaction Standards |
|
|
98 | (1) |
|
|
|
99 | (32) |
|
Application Programming Models |
|
|
100 | (2) |
|
|
|
102 | (1) |
|
Managing Transaction Contexts |
|
|
103 | (3) |
|
|
|
106 | (1) |
|
|
|
107 | (2) |
|
Transactional Object Interface |
|
|
108 | (1) |
|
|
|
108 | (1) |
|
|
|
109 | (1) |
|
|
|
110 | (1) |
|
|
|
111 | (4) |
|
|
|
112 | (1) |
|
|
|
113 | (2) |
|
|
|
115 | (3) |
|
Participating in an OTS Transaction |
|
|
118 | (15) |
|
|
|
118 | (4) |
|
SubtransactionAwareResource |
|
|
122 | (2) |
|
|
|
124 | (1) |
|
Participant Relationships |
|
|
125 | (1) |
|
Transactions and Registered Resources |
|
|
126 | (2) |
|
|
|
128 | (2) |
|
|
|
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) |
|
|
|
136 | (1) |
|
|
|
137 | (1) |
|
An Example of a Recoverable Server |
|
|
137 | (3) |
|
Example of a Transactional Object |
|
|
140 | (1) |
|
|
|
141 | (13) |
|
|
|
142 | (1) |
|
Transactional Implementation |
|
|
143 | (1) |
|
|
|
143 | (2) |
|
|
|
145 | (1) |
|
|
|
146 | (1) |
|
Choosing an OTS Implementation |
|
|
147 | (2) |
|
|
|
149 | (4) |
| Part 2 Transactions in J2EE |
|
|
Chapter 4 JDBC and Transactions |
|
|
153 | (32) |
|
|
|
154 | (6) |
|
|
|
154 | (5) |
|
|
|
159 | (1) |
|
Transaction Isolation Levels |
|
|
160 | (4) |
|
Implications of Relaxed Isolation |
|
|
161 | (1) |
|
|
|
161 | (1) |
|
|
|
162 | (1) |
|
|
|
162 | (1) |
|
|
|
162 | (4) |
|
|
|
163 | (1) |
|
TRANSACTION READ_UNCOMMITTED |
|
|
163 | (1) |
|
TRANSACTION_READ_COMMITED |
|
|
163 | (1) |
|
TRANSACTION_REPEATABLE_READ |
|
|
164 | (1) |
|
|
|
164 | (1) |
|
|
|
164 | (2) |
|
JDBC 2.0 Advanced Features |
|
|
166 | (1) |
|
|
|
166 | (1) |
|
|
|
167 | (1) |
|
|
|
167 | (16) |
|
XADataSource and XAConnection Interfaces |
|
|
169 | (1) |
|
|
|
170 | (3) |
|
|
|
173 | (10) |
|
|
|
183 | (2) |
|
Chapter 5 JMS and Transactions |
|
|
185 | (22) |
|
What Is Message-Oriented Middleware? |
|
|
185 | (3) |
|
|
|
188 | (2) |
|
|
|
190 | (2) |
|
|
|
190 | (1) |
|
|
|
191 | (1) |
|
|
|
191 | (1) |
|
|
|
192 | (3) |
|
|
|
195 | (1) |
|
|
|
195 | (4) |
|
|
|
196 | (1) |
|
|
|
197 | (1) |
|
|
|
197 | (2) |
|
Application Server Integration |
|
|
199 | (3) |
|
|
|
202 | (3) |
|
|
|
205 | (2) |
|
Chapter 6 Enterprise JavaBeans and Transactions |
|
|
207 | (30) |
|
|
|
207 | (28) |
|
|
|
210 | (17) |
|
Container-Managed Transactions |
|
|
211 | (3) |
|
Specifying Container-Managed Transactions |
|
|
214 | (1) |
|
Bean-Managed Transactions |
|
|
215 | (2) |
|
|
|
217 | (1) |
|
|
|
217 | (4) |
|
Bean Types and Transactions |
|
|
221 | (3) |
|
|
|
224 | (1) |
|
|
|
225 | (1) |
|
|
|
226 | (1) |
|
|
|
226 | (1) |
|
|
|
227 | (2) |
|
Managing MDB Transactions |
|
|
229 | (2) |
|
Bean-Managed Transactions |
|
|
229 | (2) |
|
Container-Managed Transactions |
|
|
231 | (1) |
|
Transaction Context Propagation |
|
|
231 | (4) |
|
|
|
235 | (2) |
|
Chapter 7 J2EE Connector Architecture and Transactions |
|
|
237 | (22) |
|
Enterprise Application Integration |
|
|
238 | (1) |
|
|
|
238 | (1) |
|
|
|
239 | (1) |
|
|
|
239 | (6) |
|
|
|
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) |
|
|
|
242 | (1) |
|
|
|
243 | (4) |
|
javax. resource.spi.ManagedConnection |
|
|
244 | (1) |
|
javax.resource.spi.ManagedConnectionFactory |
|
|
244 | (1) |
|
|
|
245 | (2) |
|
|
|
247 | (6) |
|
|
|
247 | (1) |
|
|
|
247 | (4) |
|
SPI LocalTransaction Interface |
|
|
247 | (1) |
|
CCI LocalTransaction Interface |
|
|
248 | (2) |
|
|
|
250 | (1) |
|
|
|
251 | (2) |
|
|
|
253 | (2) |
|
|
|
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) |
|
|
|
262 | (1) |
|
|
|
262 | (3) |
|
|
|
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) |
|
|
|
272 | (1) |
|
|
|
272 | (1) |
|
Application Servers and Thin Clients |
|
|
273 | (1) |
|
|
|
273 | (1) |
|
The Usefulness of Interposition |
|
|
274 | (3) |
|
|
|
274 | (3) |
|
Object Decomposition to Improve Throughput |
|
|
277 | (2) |
|
|
|
279 | (2) |
|
Chapter 9 The J2EE Activity Service |
|
|
281 | (24) |
|
|
|
281 | (4) |
|
The Proposed J2EE Solution |
|
|
285 | (2) |
|
Activities, Participants and Coordination |
|
|
287 | (1) |
|
Relationship to the J2EE Architecture |
|
|
288 | (1) |
|
|
|
289 | (1) |
|
The High-Level Service (HLS) |
|
|
290 | (6) |
|
Actions, SignalSets and Signals |
|
|
290 | (2) |
|
|
|
292 | (4) |
|
Example Extended Transaction Models |
|
|
296 | (5) |
|
|
|
296 | (1) |
|
Nested Top-Level Transactions with Compensations |
|
|
297 | (2) |
|
|
|
299 | (2) |
|
Where Do I Get an Activity Service? |
|
|
301 | (1) |
|
|
|
302 | (3) |
|
Chapter 10 Transactions and Web Services |
|
|
305 | (56) |
|
Some Common Features of Web Services Transactions |
|
|
306 | (3) |
|
|
|
306 | (1) |
|
|
|
307 | (2) |
|
The OASIS Business Transactions Protocol |
|
|
309 | (12) |
|
|
|
309 | (1) |
|
|
|
310 | (1) |
|
XML Message Sets and Carrier Bindings |
|
|
311 | (2) |
|
|
|
313 | (1) |
|
|
|
313 | (1) |
|
|
|
314 | (1) |
|
|
|
315 | (2) |
|
|
|
315 | (1) |
|
Resignation by a Participant |
|
|
316 | (1) |
|
|
|
316 | (1) |
|
Autonomous decision by a participant |
|
|
316 | (1) |
|
|
|
317 | (1) |
|
|
|
317 | (4) |
|
Web Services Coordination and Transactions |
|
|
321 | (11) |
|
|
|
324 | (8) |
|
|
|
324 | (4) |
|
|
|
328 | (3) |
|
Example of Using Business Activities |
|
|
331 | (1) |
|
|
|
332 | (1) |
|
The Web Services Composite Application Framework |
|
|
332 | (12) |
|
|
|
333 | (2) |
|
The Coordination Framework |
|
|
335 | (1) |
|
|
|
336 | (8) |
|
|
|
336 | (4) |
|
|
|
340 | (4) |
|
|
|
344 | (1) |
|
|
|
344 | (2) |
|
Java API for XML Transactions (JAXTX) |
|
|
346 | (13) |
|
|
|
347 | (1) |
|
|
|
348 | (1) |
|
|
|
349 | (1) |
|
|
|
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) |
|
|
|
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) |
|
|
|
365 | (1) |
|
|
|
365 | (2) |
| Appendix B Experiences Gained and Lessons Learned |
|
367 | (12) |
|
Commercial Implementations versus Open-Source |
|
|
367 | (8) |
|
|
|
368 | (4) |
|
|
|
368 | (1) |
|
|
|
368 | (1) |
|
|
|
369 | (1) |
|
|
|
369 | (1) |
|
Reliability Characteristics |
|
|
369 | (1) |
|
Support for Nested Transactions |
|
|
370 | (1) |
|
Support for Arbitrary Participants |
|
|
370 | (1) |
|
|
|
370 | (3341) |
|
|
|
3711 | |
|
|
|
371 | (1) |
|
|
|
371 | (1) |
|
Support for Web Services Transactions |
|
|
371 | (1) |
|
|
|
371 | (1) |
|
|
|
372 | (1) |
|
Support for Multi-Threading |
|
|
372 | (1) |
|
|
|
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) |
|
|
|
375 | (1) |
|
Underestimating Your Requirements |
|
|
376 | (1) |
|
Choosing the Right Implementation |
|
|
377 | (1) |
|
|
|
378 | (1) |
|
|
|
378 | (1) |
| Appendix C A Brief History of Transaction Systems |
|
379 | (4) |
|
|
|
379 | (1) |
|
|
|
379 | (1) |
|
The Hewlett-Packard Transaction Service (HP-TS) |
|
|
379 | (1) |
|
|
|
380 | (1) |
|
|
|
380 | (1) |
|
The Object Transaction Service (OTS) |
|
|
381 | (2) |
| Appendix D Glossary of Terms |
|
383 | (6) |
| Index |
|
389 | |