Enterprise JavaBeans 3.0, 5/e

Richard Monson-Haefel, Bill Burke

  • 出版商: O'Reilly
  • 出版日期: 2006-05-26
  • 售價: $1,850
  • 貴賓價: 9.5$1,758
  • 語言: 英文
  • 頁數: 768
  • 裝訂: Paperback
  • ISBN: 059600978X
  • ISBN-13: 9780596009786
  • 相關分類: Java 程式語言
  • 已絕版

買這商品的人也買了...

商品描述

Description

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 editions. Its easy-to-follow style and hundreds of practical examples help you simplify the complex world of EJB - without the costly trial and error.

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 large
enough 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.

 

 

Table of Contents

Foreword

Preface

Part I. The EJB 3.0 Standard

1. Introduction

     Server-Side Components

     Persistence and Entity Beans

     Asynchronous Messaging

     Web Services

     Titan Cruises: An Imaginary Business

     What's Next?

2. Architectural Overview

     The Entity Bean

     The Enterprise Bean Component

     Using Enterprise and Entity Beans

     The Bean-Container Contract

     Summary

3. Resource Management and Primary Services

     Resource Management

     Primary Services

     What's Next?

4. Developing Your First Beans

     Developing an Entity Bean

     Developing a Session Bean

5. Persistence: EntityManager

     Entities Are POJOs

     Managed Versus Unmanaged Entities

     Packaging a Persistence Unit

     Obtaining an EntityManager

     Interacting with an EntityManager

     Resource Local Transactions

6. Mapping Persistent Objects

     The Programming Model

     Basic Relational Mapping

     Primary Keys

     Property Mappings

     Multitable Mappings with @SecondaryTable

     @Embedded Objects

7. Entity Relationships

     The Seven Relationship Types

     Mapping Collection-Based Relationships

     Detached Entities and FetchType

     Cascading

8. Entity Inheritance

     Single Table per Class Hierarchy

     Table per Concrete Class

     Table per Subclass

     Mixing Strategies

     Nonentity Base Classes

9. Queries and EJB QL

     Query API

     EJB QL

     Native Queries

     Named Queries

10. Entity Callbacks and Listeners

     Callback Events

     Callbacks on Entity Classes

     Entity Listeners

11. Session Beans

     The Stateless Session Bean

     SessionContext

     The Life Cycle of a Stateless Session Bean

     The Stateful Session Bean

     The Life Cycle of a Stateful Session Bean

     Stateful Session Beans and Extended Persistence Contexts

     Nested Stateful Session Beans

12. Message-Driven Beans

     JMS and Message-Driven Beans

     JMS-Based Message-Driven Beans

     The Life Cycle of a Message-Driven Bean

     Connector-Based Message-Driven Beans

     Message Linking

13. Timer Service

     Titan's Maintenance Timer

     Timer Service API

     Transactions

     Stateless Session Bean Timers

     Message-Driven Bean Timers

     Final Words

14. The JNDI ENC and Injection

     The JNDI ENC

     Reference and Injection Types

15. Interceptors

     Intercepting Methods

     Interceptors and Injection

     Intercepting Life Cycle Events

     Exception Handling

     Interceptor Life Cycle

     Bean Class @AroundInvoke Methods

     Future Interceptor Improvements

16. 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

17. Security

     Authentication and Identity

     Authorization

     The RunAs Security Identity

     Programmatic Security

18. EJB 3.0: Web Services Standards

     Web Services Overview

     XML Schema and XML Namespaces

     SOAP 1.1

     WSDL 1.1

     UDDI 2.0

     From Standards to Implementation

19. EJB 3.0 and Web Services

     Accessing Web Services with JAX-RPC

     Defining a Web Service with JAX-RPC

     Using JAX-WS

     Other Annotations and APIs

20. Java EE

     Servlets

     JavaServer Pages

     Web Components and EJB

     Filling in the Gaps

     Fitting the Pieces Together

21. EJB Design in the Real World

     Predesign: Containers and Databases

     Design

     Should You Use EJBs?

     Wrapping Up

Part II. The JBoss Workbook

Introduction

1. JBoss Installation and Configuration

     About JBoss

     Installing the JBoss Application Server

     A Quick Look at JBoss Internals

     Exercise Code Setup and Configuration

2. Exercises for Chapter 4

     Exercise 4.1: Your First Beans with JBoss

     Exercise 4.2: JNDI Binding with Annotations

     Exercise 4.3: JNDI Binding with XML

3. Exercises for Chapter 5

     Exercise 5.1: Interacting with EntityManager

     Exercise 5.2: Standalone Persistence

4. Exercises for Chapter 6

     Exercise 6.1: Basic Property Mappings

     Exercise 6.2: @IdClass

     Exercise 6.3: @EmbeddedId

     Exercise 6.4: Multitable Mappings

     Exercise 6.5: Embeddable Classes

5. Exercises for Chapter 7

     Exercise 7.1: Cascading

     Exercise 7.2: Inverse Relationships

     Exercise 7.3: Lazy Initialization

6. Exercises for Chapter 8

     Exercise 8.1: Single Table per Hierarchy

     Exercise 8.2: Single Table per Hierarchy

     Exercise 8.3: JOINED Inheritance Strategy

7. Exercises for Chapter 9

     Exercise 9.1: Query and EJB QL Basics

     Exercise 9.2: Native SQL Queries

8. Exercises for Chapter 10

     Exercise 10.1: Entity Callbacks

     Exercise 10.2: Entity Listeners

9. Exercises for Chapter 11

     Exercise 11.1: Stateless Session Bean

     Exercise 11.2: XML Override

     Exercise 11.3: Annotationless Stateless Session Bean

     Exercise 11.4: Stateful Session Bean

     Exercise 11.5: Annotationless Stateful Session Bean

10. Exercises for Chapter 12

     Exercise 12.1: The Message-Driven Bean

11. Exercises for Chapter 13

     Exercise 13.1: EJB Timer Service

12. Exercises for Chapter 15

     Exercise 15.1: EJB Interceptors

     Exercise 15.2: Intercepting EJB Callbacks

13. Exercises for Chapter 16

     Exercise 16.1: Conversational Persistence Contexts

14. Exercises for Chapter 17

     Exercise 17.1: Security

     Exercise 17.2: Securing Through XML

15. Exercises for Chapter 19

     Exercise 19.1: Exposing a Stateless Bean

     Exercise 19.2: Using a .NET Client

Part III. Appendix

Appendix:. JBoss Database Configuration

Index