Book description
If you're up on the latest Java technologies, then you know that Enterprise JavaBeans (EJB) 3.0 is the hottest news in Java this year. In fact, EJB 3.0 is being hailed as the new standard of server-side business logic programming. And O'Reilly's award-winning book on EJB has been refreshed just in time to capitalize on the technology's latest rise in popularity.
This fifth edition, written by Bill Burke and Richard Monson-Haefel, has been updated to capture the very latest need-to-know Java technologies in the same award-winning fashion that drove the success of the previous four strong-selling editions. Bill Burke, Chief Architect at JBoss, Inc., represents the company on the EJB 3.0 and Java EE 5 specification committees. Richard Monson-Haefel is one of the world's leading experts on Enterprise Java.
Enterprise JavaBeans 3.0, 5th Edition is organized into two parts: the technical manuscript followed by the JBoss workbook. The technical manuscript explains what EJB is, how it works, and when to use it. The JBoss workbook provides step-by-step instructions for installing, configuring, and running the examples from the manuscript on the JBoss 4.0 Application Server.
Although EJB makes application development much simpler, it's still a complex and ambitious technology that requires a great deal of time to study and master. But now, thanks to Enterprise JavaBeans 3.0, 5th Edition, you can overcome the complexities of EJBs and learn from hundreds of practical examples that are largeenough to test key concepts but small enough to be taken apart and explained in the detail that you need. Now you can harness the complexity of EJB with just a single resource by your side.
Publisher resources
Table of contents
- Dedication
- A Note Regarding Supplemental Files
- Foreword
- Preface
-
I. The EJB 3.0 Standard
- 1. Introduction
- 2. Architectural Overview
- 3. Resource Management and Primary Services
- 4. Developing Your First Beans
-
5. Persistence: EntityManager
- 5.1. Entities Are POJOs
- 5.2. Managed Versus Unmanaged Entities
- 5.3. Packaging a Persistence Unit
- 5.4. Obtaining an EntityManager
- 5.5. Interacting with an EntityManager
- 5.6. Resource Local Transactions
- 6. Mapping Persistent Objects
-
7. Entity Relationships
-
7.1. The Seven Relationship Types
- 7.1.1. One-to-One Unidirectional Relationship
- 7.1.2. One-to-One Bidirectional Relationship
- 7.1.3. One-to-Many Unidirectional Relationship
- 7.1.4. The Cruise, Ship, and Reservation Entities
- 7.1.5. Many-to-One Unidirectional Relationship
- 7.1.6. One-to-Many Bidirectional Relationship
- 7.1.7. Many-to-Many Bidirectional Relationship
- 7.1.8. Many-to-Many Unidirectional Relationship
- 7.2. Mapping Collection-Based Relationships
- 7.3. Detached Entities and FetchType
- 7.4. Cascading
-
7.1. The Seven Relationship Types
- 8. Entity Inheritance
-
9. Queries and EJB QL
- 9.1. Query API
-
9.2. EJB QL
- 9.2.1. Abstract Schema Names
- 9.2.2. Simple Queries
- 9.2.3. Selecting Entity and Relationship Properties
- 9.2.4. Constructor Expressions
- 9.2.5. The IN Operator and INNER JOIN
- 9.2.6. LEFT JOIN
- 9.2.7. Fetch Joins
- 9.2.8. Using DISTINCT
- 9.2.9. The WHERE Clause and Literals
- 9.2.10. The WHERE Clause and Operator Precedence
- 9.2.11. The WHERE Clause and Arithmetic Operators
- 9.2.12. The WHERE Clause and Logical Operators
- 9.2.13. The WHERE Clause and Comparison Symbols
- 9.2.14. The WHERE Clause and Equality Semantics
- 9.2.15. The WHERE Clause and BETWEEN
- 9.2.16. The WHERE Clause and IN
- 9.2.17. The WHERE Clause and IS NULL
- 9.2.18. The WHERE Clause and IS EMPTY
- 9.2.19. The WHERE Clause and MEMBER OF
- 9.2.20. The WHERE Clause and LIKE
- 9.2.21. Functional Expressions
- 9.2.22. The ORDER BY Clause
- 9.2.23. GROUP BY and HAVING
- 9.2.24. Subqueries
- 9.2.25. Bulk UPDATE and DELETE
- 9.3. Native Queries
- 9.4. Named Queries
- 10. Entity Callbacks and Listeners
-
11. Session Beans
-
11.1. The Stateless Session Bean
-
11.1.1. The ProcessPayment EJB
- 11.1.1.1. The database table: PAYMENT
- 11.1.1.2. The business interface: ProcessPayment
- 11.1.1.3. Entities as parameters
- 11.1.1.4. Domain objects: the CreditCardDO and CheckDO classes
- 11.1.1.5. An application exception: PaymentException
- 11.1.1.6. The bean class: ProcessPaymentBean
- 11.1.1.7. Accessing environment properties (injection)
- 11.1.2. The XML Deployment Descriptor
-
11.1.1. The ProcessPayment EJB
- 11.2. SessionContext
- 11.3. The Life Cycle of a Stateless Session Bean
- 11.4. The Stateful Session Bean
- 11.5. The Life Cycle of a Stateful Session Bean
- 11.6. Stateful Session Beans and Extended Persistence Contexts
- 11.7. Nested Stateful Session Beans
-
11.1. The Stateless Session Bean
-
12. Message-Driven Beans
- 12.1. JMS and Message-Driven Beans
- 12.2. JMS-Based Message-Driven Beans
- 12.3. The Life Cycle of a Message-Driven Bean
- 12.4. Connector-Based Message-Driven Beans
- 12.5. Message Linking
- 13. Timer Service
-
14. The JNDI ENC and Injection
- 14.1. The JNDI ENC
- 14.2. Reference and Injection Types
- 15. Interceptors
-
16. Transactions
- 16.1. ACID Transactions
-
16.2. Declarative Transaction Management
- 16.2.1. Transaction Scope
-
16.2.2. Transaction Attributes
- 16.2.2.1. Using the @TransactionAttribute annotation
- 16.2.2.2. Setting a transaction attribute within XML
- 16.2.2.3. Transaction attributes defined
- 16.2.2.4. EJB 3.0 persistence and transaction attributes
- 16.2.2.5. Message-driven beans and transaction attributes
- 16.2.2.6. EJB endpoints and transaction attributes
- 16.2.3. Transaction Propagation
- 16.3. Isolation and Database Locking
- 16.4. Nontransactional EJBs
- 16.5. Explicit Transaction Management
- 16.6. Exceptions and Transactions
- 16.7. Transactional Stateful Session Beans
- 16.8. Conversational Persistence Contexts
- 17. Security
- 18. EJB 3.0: Web Services Standards
-
19. EJB 3.0 and Web Services
- 19.1. Accessing Web Services with JAX-RPC
- 19.2. Defining a Web Service with JAX-RPC
-
19.3. Using JAX-WS
- 19.3.1. The @WebService Annotation
- 19.3.2. The @WebMethod Annotation
- 19.3.3. The @SOAPBinding Annotation
- 19.3.4. The @WebParam Annotation
- 19.3.5. The @WebResult Annotation
- 19.3.6. The @OneWay Annotation
- 19.3.7. Separating the Web Services Contract
- 19.3.8. The Service Class
- 19.3.9. The Service Endpoint Interface
- 19.3.10. The @WebServiceRef Annotation
- 19.4. Other Annotations and APIs
- 20. Java EE
-
21. EJB Design in the Real World
- 21.1. Predesign: Containers and Databases
- 21.2. Design
- 21.3. Should You Use EJBs?
- 21.4. Wrapping Up
-
II. The JBoss Workbook
- 22. Introduction
- WORKBOOK 1. JBoss Installation and Configuration
-
WORKBOOK 2. Exercises for Chapter 4
- 24.1. Exercise 4.1: Your First Beans with JBoss
- 24.2. Exercise 4.2: JNDI Binding with Annotations
- 24.3. Exercise 4.3: JNDI Binding with XML
-
WORKBOOK 3. Exercises for Chapter 5
- 25.1. Exercise 5.1: Interacting with EntityManager
- 25.2. Exercise 5.2: Standalone Persistence
- WORKBOOK 4. Exercises for Chapter 6
-
WORKBOOK 5. Exercises for Chapter 7
- 27.1. Exercise 7.1: Cascading
- 27.2. Exercise 7.2: Inverse Relationships
- 27.3. Exercise 7.3: Lazy Initialization
- WORKBOOK 6. Exercises for Chapter 8
-
WORKBOOK 7. Exercises for Chapter 9
-
29.1. Exercise 9.1: Query and EJB QL Basics
- 29.1.1. Initialize the Database
- 29.1.2. Build the Example Programs
- 29.1.3. Example Basics
- 29.1.4. Parameters and Paging
- 29.1.5. The SELECT Clause
- 29.1.6. The IN Operator and INNER JOIN
- 29.1.7. LEFT JOIN
- 29.1.8. Fetch Joins
- 29.1.9. Using DISTINCT
- 29.1.10. The WHERE Clause and Literals
- 29.1.11. The WHERE Clause and BETWEEN
- 29.1.12. The WHERE Clause and IN
- 29.1.13. The WHERE Clause and IS NULL
- 29.1.14. The WHERE Clause and IS EMPTY
- 29.1.15. The WHERE Clause and MEMBER OF
- 29.1.16. The WHERE Clause and LIKE
- 29.1.17. Aggregate Functions
- 29.1.18. The ORDER BY Clause
- 29.1.19. GROUP BY and HAVING
- 29.1.20. Subqueries
- 29.1.21. Exercise 9.2: Native SQL Queries
- 29.1.22. Initialize the Database
- 29.1.23. Build the Example Program
- 29.1.24. Examine the Example
- 29.1.25. Run the Example
-
29.1. Exercise 9.1: Query and EJB QL Basics
-
WORKBOOK 8. Exercises for Chapter 10
- 30.1. Exercise 10.1: Entity Callbacks
- 30.2. Exercise 10.2: Entity Listeners
- WORKBOOK 9. Exercises for Chapter 11
-
WORKBOOK 10. Exercises for Chapter 12
-
32.1. Exercise 12.1: The Message-Driven Bean
- 32.1.1. Start Up JBoss
- 32.1.2. Initialize the Database
- 32.1.3. Create a New JMS Queue
- 32.1.4. Build and Deploy the Example Programs
- 32.1.5. Examine ProcessPaymentBean and DataAccessBean
- 32.1.6. Examine the Client Applications
- 32.1.7. Examine ReservationProcessorBean
- 32.1.8. Run the Client Applications
-
32.1. Exercise 12.1: The Message-Driven Bean
- WORKBOOK 11. Exercises for Chapter 13
- WORKBOOK 12. Exercises for Chapter 15
- WORKBOOK 13. Exercises for Chapter 16
- WORKBOOK 14. Exercises for Chapter 17
-
WORKBOOK 15. Exercises for Chapter 19
-
37.1. Exercise 19.1: Exposing a Stateless Bean
- 37.1.1. Start Up JBoss
- 37.1.2. Initialize the Database
- 37.1.3. Build and Deploy the Example Programs
- 37.1.4. Examining TravelAgentBean
- 37.1.5. Examining the Generated WSDL
- 37.1.6. Examining the Client
- 37.1.7. The Java EE Application Client Deployment Descriptor
- 37.1.8. The JBoss Application Client Deployment Descriptor
- 37.1.9. Examining the Service Endpoint Interface
- 37.1.10. Examining the JAX-RPC Mapping File
- 37.1.11. Running the Client
- 37.1.12. Viewing the Database
- 37.2. Exercise 19.2: Using a .NET Client
-
37.1. Exercise 19.1: Exposing a Stateless Bean
- III. Appendix
- About the Authors
- Colophon
- Copyright
Product information
- Title: Enterprise JavaBeans 3.0, 5th Edition
- Author(s):
- Release date: May 2006
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596009786
You might also like
book
Enterprise JavaBeans 3.1, 6th Edition
Learn how to code, package, deploy, and test functional Enterprise JavaBeans with the latest edition of …
book
Enterprise JavaBeans, Fourth Edition
The new 2.1 version of the Enterprise JavaBeans (EJB) spec extends its support for web services …
book
Special Edition Using SOAP
This book will introduce the reader to SOAP and serve as a comprehensive reference to both …
article
Reinventing the Organization for GenAI and LLMs
Previous technology breakthroughs did not upend organizational structure, but generative AI and LLMs will. We now …