Book description
Learn how to code, package, deploy, and test functional Enterprise JavaBeans with the latest edition of this bestselling guide. Written by the developers of JBoss EJB 3.1, this book not only brings you up to speed on each component type and container service in this implementation, it also provides a workbook with several hands-on examples to help you gain immediate experience with these components.
With version 3.1, EJB's server-side component model for building distributed business applications is simpler than ever. But it's still a complex technology that requires study and lots of practice to master. Enterprise JavaBeans 3.1 is the most complete reference on this specification. You'll find a straightforward, no-nonsense explanation of the underlying technology, including Java classes and interfaces, the component model, and the runtime behavior of EJB.
- Develop your first EJBs with a hands-on walkthrough of EJB 3.1 concepts
- Learn how to encapsulate business logic with Session Beans and Message-Driven Beans
- Discover how to handle persistence through Entity Beans, the EntityManager, and the Java Persistence API
- Understand EJB's container services such as dependency injection, concurrency, and interceptors
- Integrate EJB with other technologies in the Java Enterprise Edition platform
- Use examples with either the JBossAS, OpenEJB, or GlassFish v3 EJB Containers
Publisher resources
Table of contents
-
Enterprise JavaBeans 3.1
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Preface
-
I. Why Enterprise JavaBeans?
- 1. Introduction
- 2. Component Types
- 3. Container Services
-
4. Developing Your First EJBs
-
Step 1: Preparation
-
Definitions
- Bean implementation class (session and message-driven beans)
- Bean instance (session and message-driven beans)
- Client view (session and message-driven beans)
- EJB Proxy (session beans)
- Local versus remote (session beans)
- Business interface (session beans)
- Component interface (session beans)
- Home interface (session beans)
- Endpoint interface (session beans)
- Message interface (MDBs)
- Naming Conventions
- Conventions for the Examples
-
Definitions
- Step 2: Coding the EJB
- Summary
-
Step 1: Preparation
-
II. Server-Side Component Models
- 5. The Stateless Session Bean
- 6. The Stateful Session Bean
- 7. The Singleton Session Bean
- 8. Message-Driven Beans
-
III. EJB and Persistence
- 9. Persistence: EntityManager
- 10. Mapping Persistent Objects
-
11. Entity Relationships
- The Seven Relationship Types
- Mapping Collection-Based Relationships
- Detached Entities and FetchType
- Cascading
- 12. Entity Inheritance
-
13. Queries, the Criteria API, and JPA QL
- Query API
-
JPA QL
- Abstract Schema Names
- Simple Queries
- Selecting Entity and Relationship Properties
- Constructor Expressions
- The IN Operator and INNER JOIN
- LEFT JOIN
- Fetch Joins
- Using DISTINCT
- The WHERE Clause and Literals
- The WHERE Clause and Operator Precedence
- The WHERE Clause and Arithmetic Operators
- The WHERE Clause and Logical Operators
- The WHERE Clause and Comparison Symbols
- The WHERE Clause and Equality Semantics
- The WHERE Clause and BETWEEN
- The WHERE Clause and IN
- The WHERE Clause and IS NULL
- The WHERE Clause and IS EMPTY
- The WHERE Clause and MEMBER OF
- The WHERE Clause and LIKE
- Functional Expressions
- The ORDER BY Clause
- Bulk UPDATE and DELETE
- Native Queries
- Named Queries
- 14. Entity Callbacks and Listeners
-
IV. Container Services
- 15. Security
- 16. JNDI, the ENC, and Injection
-
17. Transactions
- ACID Transactions
- Declarative Transaction Management
- Isolation and Database Locking
- Nontransactional EJBs
- Explicit Transaction Management
- Exceptions and Transactions
- Transactional Stateful Session Beans
- Conversational Persistence Contexts
- 18. Interceptors
- 19. Timer Service
- 20. EJB 3.1: Web Services Standards
- 21. EJB 3.1 and Web Services
-
V. Examples
- A. FirstEJB Example
- B. Stateless Session EJB: Encryption Example
- C. Stateful Session EJB: FTP Client Example
- D. Singleton Session EJB: RSS Cache Example
- E. Message-Driven EJB: Status Update Listeners Example
-
F. Java Persistence APIs: Employee Registry Example
- Description
- Online Companion Information
-
Source Listing
-
Implementation Resources
- SimpleEmployee.java
- EmbeddedEmployeePK.java
- EmployeeType.java
- EmployeeWithEmbeddedPK.java
- EmployeeWithExternalCompositePK.java
- EmployeeWithMappedSuperClassId.java
- EmployeeWithProperties.java
- ExternalEmployeePK.java
- Address.java
- Computer.java
- Customer.java
- Employee.java
- Phone.java
- PhoneType.java
- Task.java
- Team.java
- Customer.java
- Employee.java
- Person.java
- Customer.java
- Employee.java
- Person.java
- Customer.java
- Employee.java
- Person.java
- EntityListenerEmployee.java
- EventTracker.java
- persistence.xml
- Test Resources
-
Implementation Resources
- G. Security: Secured School Example
- H. Transactions: Blackjack Game Example
- I. Interceptors: TV Channel Service Example
- J. Timer Service: Credit Card Processor Example
- Index
- About the Authors
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
Product information
- Title: Enterprise JavaBeans 3.1, 6th Edition
- Author(s):
- Release date: September 2010
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449396961
You might also like
book
Special Edition Using Java™ Server Pages and Servlets
Special Edition Using JSP and Servlets starts by detailing the evolution of web servers that led …
book
JavaServer Faces
JavaServer Faces, or JSF, brings a component-based model to web application development that's similar to the …
audiobook
Difficult Conversations
You have to talk with a colleague about a fraught situation, but you're worried that they'll …
book
EJB 3 Developer Guide
A Practical Guide for developers and architects to the Enterprise Java Beans Standard. A rapid introduction …