Book contents
- Frontmatter
- Contents
- acknowledgements
- Introduction
- PART 1 ARCHITECTURE
- PART 2 DESIGN
- PART 3 PROGRAMMING
- Chapter 8 Implementing an Application Server Framework
- Chapter 9 Using Java to Build Business Objects
- Chapter 10 Persistent Objects: Communicating with Databases
- Chapter 11 Interfaces and Client-Side Communication
- Chapter 12 Enforcing Business Rules
- Chapter 13 Multiprocessing, Concurrency, and Transactions
- Chapter 14 The Next Generation of Business Applications
- Appendix: Setting up a Development Environment
- Index
Chapter 10 - Persistent Objects: Communicating with Databases
from PART 3 - PROGRAMMING
Published online by Cambridge University Press: 06 July 2010
- Frontmatter
- Contents
- acknowledgements
- Introduction
- PART 1 ARCHITECTURE
- PART 2 DESIGN
- PART 3 PROGRAMMING
- Chapter 8 Implementing an Application Server Framework
- Chapter 9 Using Java to Build Business Objects
- Chapter 10 Persistent Objects: Communicating with Databases
- Chapter 11 Interfaces and Client-Side Communication
- Chapter 12 Enforcing Business Rules
- Chapter 13 Multiprocessing, Concurrency, and Transactions
- Chapter 14 The Next Generation of Business Applications
- Appendix: Setting up a Development Environment
- Index
Summary
The persistent object layer forms the foundation of the application server. This layer is responsible for creating, initializing, and storing business objects derived from relational databases or other external applications. It also serves as the object broker for the application server, tracking and locating business objects already in memory. All of these tasks must be done quickly and efficiently to provide fast response time but must also work carefully to maintain the integrity of the data.
When an object is requested, the persistence layer must know how to access the data from a storage medium such as a relational database, then create the requested object from the data. Once the object is created, the new object must be registered into a data structure where it can be quickly located when the same object is requested by another process. The persistence layer must also provide concurrency control and synchronization to ensure that the data remains consistent with the database and other processes and is not corrupted when more than one process attempts to modify the attributes at the same time. The objects must also be synchronized with changes that occur in the database from other external applications so that the database itself is not corrupted.
This chapter will illustrate how to create a simple persistent object layer and discuss the implementation and programming issues involved. Although the Java language and JDBC will be used to illustrate the problems and tradeoffs that must be considered, the implementation could just as easily be done using C++ and ODBC. Java was chosen for its simplicity and brevity, not because it is a superior platform.
- Type
- Chapter
- Information
- Building Application Servers , pp. 227 - 268Publisher: Cambridge University PressPrint publication year: 2000