Book description
Enterprise JavaBeans (versions 1.1 and 1.0) is an important technology for server-side application development in Java. It offers a component architecture for developing distributed, multitiered enterprise applications. This model allows you to build complex, mission-critical systems using simple snap-together pieces that model individual business objects and processes. Enterprise JavaBeans (EJB) greatly simplifies the process of development by automatically taking care of system issues like object persistence and transaction management. This book provides a thorough introduction to EJB 1.1 and 1.0 for the enterprise software developer. It shows you how to develop enterprise Beans to model your business objects and processes. One powerful advantage of the EJB architecture is that it allows you to partition work appropriately between different parts of the system: the database provides persistence, your Beans model various business entities and the interactions between them, and your client application provides a user interface, but incorporates minimal business logic. The end result is a highly flexible system built from components that can easily be reused, and that can be changed to suit your needs without upsetting other parts of the system. Enterprise JavaBeans, 2nd Edition teaches you how to take advantage of the flexibility and simplicity that this powerful new architecture provides. This book covers:
Enterprise JavaBeans 1.1 and 1.0
Developing entity Beans and session Beans
XML Deployment Descriptors
Using the client-side API to use enterprise Beans
Transaction Management
Design Strategies
Introduction to J2EE
Table of contents
-
Enterprise JavaBeans, 2nd Edition
- Dedication
- Preface
- 1. Introduction
- 2. Architectural Overview
- 3. Resource Management and the Primary Services
-
4. Developing Your First Enterprise Beans
- Choosing and Setting Up an EJB Server
- Developing an Entity Bean
-
Developing a Session Bean
- TravelAgent: The Remote Interface
- TravelAgentHome: The Home Interface
- TravelAgentBean: The Bean Class
- EJB 1.1: TravelAgent Bean’s Deployment Descriptor
- EJB 1.0: The TravelAgent Beans’ Deployment Descriptor
- EJB 1.1: The JAR File
- EJB 1.0: The JAR File
- Deploying the TravelAgent Bean
- Creating a Client Application
- 5. The Client View
-
6. Entity Beans
- Container-Managed Persistence
-
Bean-Managed Persistence
- Making the ShipBean a Bean-Managed Entity
- Exception Handling
- EntityContext
- EJB 1.1: EJBContext
- EJB 1.0: EJBContext
- Obtaining a Connection to the Database
- The ejbCreate( ) Method
- The ejbLoad( ) and ejbStore( ) Methods
- The ejbRemove( ) Method
- ejbFind( ) Methods
- EJB 1.1: Deploying the Bean-Managed Ship Bean
- EJB 1.0: Deploying the Bean-Managed Ship Bean
-
The Life Cycle of an Entity Bean
- Does Not Exist
- The Pooled State
-
The Ready State
- Transitioning from the Pooled state to the Ready State via creation
- Transitioning from the Pooled state to the Ready State via a find method
- Transitioning from the Pooled state to the Ready State via activation
- Transitioning from the Ready State to the Pooled state via passivation
- Transitioning from the Ready State to the Pooled state via removal
- Life in the Ready State
- End of the Life Cycle
-
7. Session Beans
-
The Stateless Session Bean
- Downloading the Missing Pieces
-
The ProcessPayment Bean
- PAYMENT: The database table
- ProcessPayment: The remote interface
- Dependent classes: The CreditCard and Check classes
- PaymentException: An application exception
- ProcessPaymentHome: The home interface
- ProcessPaymentBean: The bean class
- EJB 1.1: Accessing environment properties
- EJB 1.1: EJBContext
- EJB 1.1: The ProcessPayment bean’s deployment descriptor
- EJB 1.0: The ProcessPayment bean’s deployment descriptor
- The Life Cycle of a Stateless Session Bean
-
The Stateful Session Bean
-
The TravelAgent Bean
- TravelAgent: The remote interface
- TravelAgentHome: The home interface
- Taking a peek at the client view
- TravelAgentBean: The bean class
- Why use a Reservation entity bean?
- listAvailableCabins( ): Listing behavior
- EJB 1.1: The TravelAgent deployment descriptor
- EJB 1.0: The TravelAgent deployment descriptor
-
The TravelAgent Bean
- The Life Cycle of a Stateful Session Bean
-
The Stateless Session Bean
-
8. Transactions
- ACID Transactions
- Declarative Transaction Management
- Isolation and Database Locking
- Non-Transactional Beans
- Explicit Transaction Management
- EJB 1.1: Exceptions and Transactions
- EJB 1.0: Exceptions and Transactions
- Transactional Stateful Session Beans
-
9. Design Strategies
- Hash Codes in Compound Primary Keys
- Passing Objects by Value
- Improved Performance with Session Beans
- Bean Adapters
- Implementing a Common Interface
- Entity Beans Without Create Methods
- Entity Bean Relationships
- Object-to-Relational Mapping Tools
- When Entity Beans Are Not an Option
- Avoid Chaining Stateful Session Beans
- 10. XML Deployment Descriptors
- 11. Java 2, Enterprise Edition
- A. The Enterprise JavaBeans API
- B. State and Sequence Diagrams
- C. EJB Vendors
- D. New Features in EJB 1.1
- Index
- Colophon
Product information
- Title: Enterprise JavaBeans, Second Edition
- Author(s):
- Release date: September 2001
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781565928695
You might also like
book
Enterprise JavaBeans, Third Edition
Enterprise JavaBeans was recently voted "Best Java Book" by the editors and readers of Java Developer's …
book
Enterprise JavaBeans 3.0, 5th Edition
If you're up on the latest Java technologies, then you know that Enterprise JavaBeans (EJB) 3.0 …
book
Enterprise JavaBeans, Fourth Edition
The new 2.1 version of the Enterprise JavaBeans (EJB) spec extends its support for web services …
book
Enterprise JavaBeans 3.1, 6th Edition
Learn how to code, package, deploy, and test functional Enterprise JavaBeans with the latest edition of …