Document Information

Preface

Part I Introduction

1.  Overview

2.  Using the Tutorial Examples

Part II The Web Tier

3.  Getting Started with Web Applications

4.  Java Servlet Technology

5.  JavaServer Faces Technology

6.  Introduction to Facelets

7.  Using JavaServer Faces Technology in Web Pages

8.  Developing with JavaServer Faces Technology

9.  Configuring JavaServer Faces Applications

Part III Web Services

10.  Introduction to Web Services

11.  Building Web Services with JAX-WS

12.  Building RESTful Web Services with JAX-RS and Jersey

Part IV Enterprise Beans

What Is an Enterprise Bean?

Benefits of Enterprise Beans

When to Use Enterprise Beans

Types of Enterprise Beans

What Is a Session Bean?

Types of Session Beans

Stateful Session Beans

Stateless Session Beans

Singleton Session Beans

When to Use Session Beans

What Is a Message-Driven Bean?

What Makes Message-Driven Beans Different from Session Beans?

When to Use Message-Driven Beans

Accessing Enterprise Beans

Using Enterprise Beans in Clients

Portable JNDI Syntax

Deciding on Remote or Local Access

Local Clients

Accessing Local Enterprise Beans Using the No-Interface View

Accessing Local Enterprise Beans That Implement Business Interfaces

Remote Clients

Accessing Remote Enterprise Beans

Web Service Clients

Method Parameters and Access

Isolation

Granularity of Accessed Data

The Contents of an Enterprise Bean

Packaging Enterprise Beans In EJB JAR Modules

Packaging Enterprise Beans in WAR Modules

Naming Conventions for Enterprise Beans

The Life Cycles of Enterprise Beans

The Life Cycle of a Stateful Session Bean

The Lifecycle of a Stateless Session Bean

The Lifecycle of a Singleton Session Bean

The Lifecycle of a Message-Driven Bean

Further Information about Enterprise Beans

14.  Getting Started with Enterprise Beans

15.  Running the Enterprise Bean Examples

Part V Persistence

16.  Introduction to the Java Persistence API

17.  Running the Persistence Examples

18.  The Java Persistence Query Language

Part VI Security

19.  Introduction to Security in the Java EE Platform

20.  Using Java EE Security

21.  Securing Java EE Applications

22.  Securing Web Applications

Part VII Java EE Supporting Technologies

23.  Introduction to Java EE Supporting Technologies

24.  Transactions

25.  Resource Connections

Index

 

Chapter 13

Enterprise Beans

Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Enterprise Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services such as transactions and security to its enterprise beans. These services enable you to quickly build and deploy enterprise beans, which form the core of transactional Java EE applications.