Building Enterprise JavaBeans Components
Sun ONE Studio 5 Programming Series
817-2330
Contents |
Contacting Sun Technical Support
1. Enterprise JavaBeans Concepts and the Sun ONE Studio 5 IDE
The Roles of Application Builders
The Elements of an Enterprise Bean
The Work Flow of an EJB Application at Runtime
An Enterprise Bean's Development Life Cycle
The IDE's Support for Enterprise Beans
Developing Enterprise Beans in the IDE
Creating Sets of Related CMP Entity Beans
2. Design and Programming Issues
Deciding Which Type of Bean You Need
Deciding When to Use a Stateless Session Bean
Deciding When to Use a Stateful Session Bean
Understanding the Life Cycle of a Session Bean
Taking Advantage of the EJB Container's Services
Understanding the Life Cycle of an Entity Bean
Understanding Sets of Related CMP Entity Beans and Container-Managed Relationships
Understanding Message-Driven Beans
Using Message Sources (Destinations)
Deciding When to Use a Message-Driven Bean
Deciding When Another Bean Type Is Better
Understanding the Life Cycle of a Message-Driven Bean
Using Enterprise Beans in Applications
Using Exceptions to Handle Problems
Working With Deployment Descriptors
Declaring Security in Enterprise Beans
Programming Security Into Enterprise Beans
Understanding the Application Servers and Databases
Using the EJB Builder With Session Beans
Stateless or Stateful Session Beans
Container-Managed or Bean-Managed Transactions
Starting the EJB Builder Wizard
Generating the Default Session Bean
Looking at a Session Bean's Classes
Reviewing the Generated Classes
Using Recommended Approaches When Working With Enterprise Beans
Completing a Stateless Bean's Create Method
Completing a Stateful Bean's Create Methods
Adding a Create Method to a Stateful Bean
Completing the ejbPassivate Method
Completing the ejbActivate Method
Understanding Transaction Spans
Specifying Transaction Boundaries and Rollbacks
After Creating Your Session Bean
4. Developing CMP Entity Beans
Using the EJB Builder With CMP Entity Beans
Comparing CMP and BMP Entity Beans
Creating Sets of Related CMP Entity Beans
Starting the EJB Builder Wizard
Generating a CMP Entity Bean's Infrastructure
Specifying Persistent Fields From a Database Table
Creating Your Bean's Persistent Fields From Scratch
Looking at a CMP Entity Bean's Classes
Reviewing the Generated Classes
Persistent Fields and Accessor Methods
Primary-Key Class and Required Methods
A CMP Entity Bean's Life-Cycle Methods
Completing Your CMP Entity Bean
Using Recommended Approaches When Working With Enterprise Beans
Adding or Replacing a Primary Key
After Creating Your CMP Entity Bean
5. Developing Sets of Related CMP Entity Beans
Using the EJB Builder With Sets of Related CMP Entity Beans
Creating All Related CMP Entity Beans at Once
Creating a Set of Related CMP Entity Beans One at a Time
Defining a Set of Related CMP Entity Beans
Preparing to Use a Database or Schema
Starting the EJB Builder Wizard
Generating the Bean Set's Infrastructure
Using a Database Schema Object
Looking at the Components of a CMP Entity Bean Set
Expanding the EJB Module's Node
Reviewing the Generated Classes
Completing Your Set of Related CMP Entity Beans
Using Recommended Approaches When Working With Enterprise Beans
After Creating Your Set of Related CMP Beans
6. Developing BMP Entity Beans
Starting the EJB Builder Wizard
Generating a BMP Entity Bean's Infrastructure
Looking at a BMP Entity Bean's Classes
Reviewing the Generated Classes
A BMP Entity Bean's Life-Cycle Methods
Completing Your BMP Entity Bean
Using Recommended Approaches When Working With Enterprise Beans
Defining Business and Home Methods
After Creating Your BMP Entity Bean
7. Developing Message-Driven Beans
Using the EJB Builder With Message-Driven Beans
Deciding on Transaction Management
Defining a Message-Driven Bean
Starting the EJB Builder Wizard
Generating the Basic Message-Driven Bean
Looking at a Message-Driven Bean's Components
Completing Your Message-Driven Bean
Using Recommended Approaches When Working With Enterprise Beans
Completing the onMessage Method
Completing the setMessageDrivenContext Method
After Creating Your Message-Driven Bean
Specifying a Message-Driven Destination
Specifying Resources for Client Message-Driven Beans
Avoiding Pitfalls of Message-Driven Beans
8. Preparing Enterprise Beans for Deployment
Understanding Deployment Information
Looking at a Generated Deployment Descriptor
Changing a Deployment Descriptor
Editing an EJB Module's Deployment Descriptor Directly
Reverting to the EJB Module's Last Generated Descriptor
Using Properties to Edit a Deployment Descriptor
Properties of Message-Driven Beans
Specifying EJB Local References
Specifying Environment Entries
Specifying Resource Environment References
Specifying Resource References
Specifying Security-Role References
Setting Server Properties for Individual Session and Entity Beans
Setting Sun ONE AS Properties for Message-Driven Beans
Creating and Configuring an EJB Module
Deciding What Should Go Into an EJB Module
Considering When to Create an EJB Module
Putting Enterprise Beans in an EJB Module
Setting Database-related Properties for CMP Entity Beans
Understanding the Application Server's Generated SQL
Adding Transaction Attributes to an EJB Module
Changing EJB References Within the EJB Module or Application
Overriding a Reference at the Module Level
Overriding a Reference at the Application Level
Adding Extra Files to an EJB Module
Fulfilling the Prerequisites for Testing
Preparing to Deploy to the Application Server
Preparing to Test Beans Against the PointBase Database
Starting PointBase and a Web Browser
Deploying the Test Application to a Server
Deploying and Executing the Test Application in One Step
Executing the Test Application
Using the Test Client to Test Your Beans
Understanding the Test Client Page
Testing the Sample Bean's Home Interface
Testing the Sample Bean's Business Method
Making Changes After Deployment
Preparing to Test: Some Variations
If You Want to Test a CMP or BMP Bean
If You Want to Test a Bean With EJB References
Adding Remote Interfaces to a Bean
Using the Customizer to Add Remote Interfaces
Using Property Sheets to Add Remote Interfaces
A. Working With Enterprise Beans
Using Recommended Approaches When Editing Beans
Working Through the Logical Node
Using the Customizer or Property Sheet
Using the Source Editor to Edit Beans
Understanding the IDE's Error Information
Compiling and Validating Enterprise Beans
Modifying a Bean Based on Another Bean
Copying and Pasting an Enterprise Bean
Exchanging Bean Classes or Interfaces
Changing an Entity Bean's Fields
B. Migrating and Upgrading EJB 1.1 Enterprise Beans
Understanding Updates in Recent Releases
Converting a CMP 1.x Entity Bean
Avoiding the Use of New Features in an Old Bean
Don't Add Local Interfaces to a CMP 1.x Entity Bean
Copyright © 2003, Sun Microsystems, Inc. All rights reserved.