Java Transaction Processing - Mark Little, Jon Maron, Greg Pavlik

Java Transaction Processing

Design and Implementation
Buch | Softcover
440 Seiten
2004
Prentice Hall (Verlag)
978-0-13-035290-3 (ISBN)
51,25 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
Addresses transactions related issues faced by java developers.
Transaction processing is at the heart of modern enterprise systems. This book explains in depth transaction processing technology and how it can be leveraged in the Java platform. It provides a comprehensive explanation of the underlying concepts in transactions that are needed to understand and exploit the technology correctly. All technical information delivered in the book corresponds directly to the latest revision of Java. The authors cover how transactional aspects of all the major J2EE components work and the practical consequences of implementation choices. In addition, this text looks beyond Java at standards and implementations that provide for broad interoperability across heterogeneous application environments. Finally, the book provides a look at how emerging web services standards will address the next generation of reliable information systems.

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

Foreword by Steven G. Harris.

Foreword by Eric Newcomer.

Preface.

Acknowledgments.

I. JAVA TRANSACTIONS FUNDAMENTALS.

1. Transactions Fundamentals.

What Are Transactions and Why Do I Need Them?

Atomicity.

Consistency.

Isolation (Serializability).

Two-Phase Concurrency Control.

Optimistic Versus Pessimistic Concurrency Control.

Type-Specific Concurrency Control.

Deadlock Detection and Prevention.

Durability.

Services and Participants.

Two-Phase Commit Optimizations.

Synchronizations.

Heuristic Transactions.

The Transaction Log.

Failure Recovery.

Trust Implications.

Types of Transactions.

Nested Transactions.

Independent Top-Level Transactions.

Concurrent Transactions.

Glued Transactions.

Distributed Transactions.

The Transaction Context.

Interposition.

Controlling a Transaction.

Transactions and Threads.

Checked Transactions.

Suspending and Resuming Transactionality.

Transactions and Queues.

Transactions and Replication.

Maintaining Information on Persistent Objects.

Replication Protocols.

Integrating Replication and Transactions.

Availability Measures in Current Application Servers.

Transaction Processing Monitors.

Transactions and Workflow.

Summary.

2. Foundation of Transactions in J2EE: The Java Transaction API.

What Is the DTP?

Java Transaction API.

Application Level Transaction Management in Java.

UserTransaction Interface.

TransactionManager Interface.

Suspending and Resuming a Transaction.

Transaction Interface.

Transaction Status.

Resource Enlistment.

Transaction Synchronization.

JTA-DTP Discrepancies.

Transaction Manager to Resource Manager Interfaces.

XID Interface 80

XAResource Interface.

Thread of Control.

Transaction Association.

Opening a Resource Manager.

Closing a Resource Manager.

Putting the JTA APIs Together.

Architectural Considerations.

Failure Recovery.

Tree of Process Model.

Transaction Interoperability.

Protocol Bridges.

Last Resource Commit.

Conclusion.

3. The Java Transaction Service.

The OTS in a Nutshell.

The Java Transaction Service.

Relationship to Other Transaction Standards.

The OTS Architecture.

Application Programming Models.

The Transaction Factory.

Managing Transaction Contexts.

Nested Transactions.

Transaction Propagation.

TransactionalObject Interface.

OTSPolicy.

Examples.

Handling Heuristics.

Transaction Controls.

The Terminator.

The Coordinator.

Current.

Participating in an OTS Transaction.

Resource.

SubtransactionAwareResource.

Synchronization.

Participant Relationships.

Transactions and Registered Resources.

The RecoveryCoordinator.

Interposition.

Shared and Unshared Transactions.

Checked Transaction Behavior.

Transaction Interoperability.

Writing Applications Using OTS Interfaces.

Transaction Context Management.

A Transaction Originator: Indirect Context Management and Implicit Propagation.

Transaction Originator: Direct Context Management and Explicit Propagation.

Implementing a Recoverable Server.

Transactional Object.

Resource Object.

An Example of a Recoverable Server.

Example of a Transactional Object.

Worked Example.

Resource.

Transactional Implementation.

Server Implementation.

Client Implementation.

Sequence Diagram.

Choosing an OTS Implementation.

Summary.

II. TRANSACTIONS IN J2EE.

4. JDBC and Transactions.

The Basic JDBC Model.

java.sql.Connection.

Types of JDBC Drivers.

Transaction Isolation Levels.

Implications of Relaxed Isolation.

Dirty Reads.

Non-repeatable Reads.

Phantom Reads.

Isolation Constraints.

TRANSACTION_NONE.

TRANSACTION_READ_UNCOMMITTED.

TRANSACTION_READ_COMMITED.

TRANSACTION_REPEATABLE_READ.

TRANSACTION_SERIALIZABLE.

Local Transactions.

JDBC 2.0 Advanced Features.

Batch Updates.

Updateable Result Sets.

Distributed Transactions.

XADataSource and XAConnection Interfaces.

XAResource Interface.

Connection Management.

Summary.

5. JMS and Transactions.

What Is Message-Oriented Middleware?

Java Message Service.

Message Acknowledgement.

AUTO_ACKNOWLEDGE Mode.

DUPS_OK_ACKNOWLEDGE Mode.

CLIENT_ACKNOWLEDGE Mode.

JMS Local Transactions.

JMS 1.1 Improvements.

Global Transactions.

XAConnectionFactory.

XAConnection.

XASession.

Application Server Integration.

Example Application.

Summary.

6. EnterpriseJavaBeans and Transactions.

What Are EJBs?

Transaction Support.

Container-Managed Transactions.

Specifying Container-Managed Transactions.

Bean-Managed Transactions.

BMT vs. CMT.

Error Handling.

Bean Types and Transactions.

Optimistic Locking.

Pessimistic Locking.

Commit Options.

Isolation Levels.

Message-Driven Beans.

Managing MDB Transactions.

Bean-Managed Transactions.

Container-Managed Transactions.

Transaction Context Propagation.

Summary.

7. J2EE Connector Architecture and Transactions.

Enterprise Application Integration.

Integration Servers.

Web Services.

Inside J2C.

CCI.

javax.resource.cci.Connection.

javax.resource.cci.ConnectionFactory.

javax.resource.cci.Record.

javax.resource.cci.Interaction.

javax.resource.cci.InteractionSpec.

CCI Example 242

SPI.

javax.resource.spi.ManagedConnection.

javax.resource.spi.ManagedConnectionFactory.

Connection Management.

Transaction Management.

NoTransaction.

Local Transactions.

SPI LocalTransaction Interface.

CCI LocalTransaction Interface.

Sample Scenario.

Distributed Transactions.

J2C Futures.

Summary.

III. THE FUTURE OF TRANSACTIONS IN J2EE AND WEB SERVICES.

8. Advanced Transaction Concepts.

Is Java Suitable for High Performance Transaction Systems?

Compiled versus Interpreted.

The Web-Effect on Transaction Systems.

Java and E-commerce.

The 100% Solution.

Conclusion.

End-to-End Transactional Guarantees.

End-to-End Transactions and the New Generation of Transaction Systems.

Is End-to-End Transactionality Possible at All?

Online Transaction Processing versus Object-Oriented Transaction Processing.

The OTS and End-to-End Transactionality.

The CORBA Effect.

The J2EE Effect.

Application Servers and Thin Clients.

Conclusions.

The Usefulness of Interposition.

The Universal Adapter.

Object Decomposition to Improve Throughput.

Summary.

9. The J2EE Activity Service.

When ACID Is Too Strong.

The Proposed J2EE Solution.

Activities, Participants and Coordination.

Relationship to the J2EE Architecture.

Coordinating Activities.

The High-Level Service (HLS).

Actions, SignalSets and Signals.

SignalSets.

Example Extended Transaction Models.

Two-Phase Commit.

Nested Top-Level Transactions with Compensations.

Workflow Coordination.

Where Do I Get an Activity Service?

Summary.

10. Transactions and Web Services.

Some Common Features of Web Services Transactions.

Obtaining Consensus.

General Architecture.

The OASIS Business Transactions Protocol.

Open-Top Coordination.

Atoms and Cohesions.

XML Message Sets and Carrier Bindings.

Participants.

The Composer.

Roles in BTP.

Optimizations.

One-shot.

Resignation by a Participant.

Spontaneous Prepare.

Autonomous decision by a participant.

Qualifiers.

Using BTP.

Web Services Coordination and Transactions.

WS-Transaction Models.

Atomic Transaction.

Business Activity.

Example of Using Business Activities.

The API.

The Web Services Composite Application Framework.

The Context Service.

The Coordination Framework.

The Transaction Models.

Long-Running Activities.

Business Process Model.

The API.

Which Specification?

Java API for XML Transactions (JAXTX).

JAXTX Architecture.

The Components.

XML Configuration.

The API.

Transaction Termination State.

Current Transaction Status.

The Result of a Transaction.

Demarcating Client-Side Transactions.

Controlling Server-Side Transactions.

Transaction Model-Specific APIs.

Summary.

Appendix A. Resources.

Transactional J2EE/J2SE Specifications.

Java 2 Plaform, Enterprise Edition (J2EE) Specification 1.4.

The Java Transaction API (JTA) Specification 1.0.1B.

The Java Transaction Service (JTS) Specification 1.0.

The JDBC Specifications, 3.0, 2.1, and Optional Package API 2.0.

Java Message Service (JMS) Specification 1.1.

Enterprise JavaBeans (EJB) Specification 2.1.

J2EE Connector (JCA) Specification 1.5.

Java API for XML Transactions.

J2EE Activity Service for Extended Transactions.

Transactional Web Services Specifications.

Web Services Composite Application Framework (WS-CAF) 1.0.

Web Services Transaction (WS-Transaction).

Web Services Coordination (WS-Coordination).

Web Services Choreography (WS-C).

Business Process Execution Language for Web Services Version 1.1.

BTP Committee Specification.

Other Transaction-Related Specifications.

Object Transaction Service (OTS) Specification 1.3.

Additional Structuring Mechanisms for the OTS, version 1.0.

Distributed TP: The XA Specification.

Distributed TP: The TX (Transaction Demarcation) Specification.

Distributed TP: Reference Model, Version 3.

Books.

Articles.

Appendix B. Experiences Gained and Lessons Learned.

Commercial Implementations versus Open-Source.

Questions to Consider.

Development Background.

Performance.

Fault Tolerance.

Two-Phase Commit.

Reliability Characteristics.

Support for Nested Transactions.

Support for Arbitrary Participants.

Quality Assurance.

Distributed Transactions.

Management Support.

Pedigree.

Support for Web Services Transactions.

Cost.

Openness.

Support for Multi-Threading.

Summary.

Catalog of Transaction System Implementations.

Commercial Implementations.

Open-Source Implementations.

Experiences of Choosing a Transaction Service.

Build versus Buy.

Underestimating Your Requirements.

Choosing the Right Implementation.

Down and Out.

Summary.

Appendix C. A Brief History of Transaction Systems.

CICS.

Tuxedo.

The Hewlett-Packard Transaction Service (HP-TS).

Encina.

X/Open.

The Object Transaction Service (OTS).

Appendix D. Glossary of Terms.

Index.

 

 

 

Erscheint lt. Verlag 8.7.2004
Verlagsort Upper Saddle River
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
Mathematik / Informatik Informatik Web / Internet
ISBN-10 0-13-035290-X / 013035290X
ISBN-13 978-0-13-035290-3 / 9780130352903
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

Buch (2023)
Carl Hanser (Verlag)
29,99
Einführung, Ausbildung, Praxis

von Christian Ullenboom

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90