<IMG SRC="fla_train.gif" WIDTH=200 HEIGHT=400 BORDER=0> <IMG SRC="fla_fill.gif" WIDTH=200 HEIGHT=400 BORDER=0> <IMG SRC="fla_fill.gif" WIDTH=200 HEIGHT=400 BORDER=0> <IMG SRC="fla_fill.gif" WIDTH=200 HEIGHT=400 BORDER=0> <IMG SRC="fla_fill.gif" WIDTH=200 HEIGHT=400 BORDER=0> <IMG SRC="fla_fill.gif" WIDTH=200 HEIGHT=400 BORDER=0> <IMG SRC="fla_fill.gif" WIDTH=200 HEIGHT=400 BORDER=0>
Click Here for the Outline in PDF Version
Course Outline: Enterprise Javabeans

(5 Days) with Hands-On Labs
    Learning Objectives

  • Understand the role of Enterprise JavaBeans in enterprise-level systems development, and its relationship to other J2EE technologies such as JSP, servlets, JMS, CORBA, and XML
  • Understand the EJB architecture: the role of the EJB container in mediating contact between the client and the bean, transaction control, authorization control, and the importance of object pooling
  • Understand the development cycle for beans: Java source code and compilation, XML deployment descriptors, EJB compilation and deployment, and use by an application server
  • Understand the role of entity beans, their lifecycle and interactions with the container
  • Develop and test BMP and CMP entity beans and understand the importance of each of the entity-bean methods in assisting the container in pooling
  • Understand the role of session beans, their lifecycle and interactions with the container
  • Develop and test stateless and stateful session beans and effectively manage passivation/activation cycles
  • Use the bean context interfaces to assist with persistence code and to correctly establish bean-to-bean communication
  • Understand the EJB transaction architecture and apply transaction attributes to EJB systems
  • Understand the EJB security architecture and apply roles and authorization attributes to EJB systems
  • Tune EJB application servers and EJB code for performance
  • Understand and apply design patterns that are important to common distributed systems and EJB systems in particular


This course description should be used to determine whether the course is appropriate for you based on your current skill and technical training needs. Technical information is provided on the intended audience, course prerequisites, and covered topics. Course content, prices, and availability are subject to change without notice.


Course Audience

This is suitable for Java developers or technical managers who want to gain an understanding of what EJB is.

Course Description

This course offers the Java programmer an grounding in the Enterprise JavaBeans (EJB) architecture and the skills to develop EJBs effectively for enterprise development efforts. EJB’s position at the heart of the Java Enterprise platform and the use of EJB application servers as the backbone of large-scale distributed systems are studied. We consider the advantages of the application server architecture – transaction control, security, persistence, scalability through pooling and clustering – and study the development process for entity and session beans in depth. The J2EE reference implementation is used for all demo and lab work, and we emphasize portable EJB 1.1 code.

The focus for this course is on end-to-end connectivity. The course follows a path roughly from the data layer to the presentation layer, so we look at entity beans first, and work demos and exercises in both Bean-Managed and Container-Managed Persistent Beans. Then the EJB session layer is considered, and both stateless and stateful session beans are developed. As part of the lab work, these are hooked to provided JSPs to illustrate the complete system and typical architecture. (Our JSP module is an excellent companion to this module, and in fact the primary lab track for this course is an extension of the JSP module’s labs.)

Once the basics of designing, developing and deploying EJBs are understood, we study declarative and programmatic transaction control. The EJB security architecture is also considered, and a simple role-based authorization design applied to the course’s main lab project. The course concludes with a chapter on best-practice EJB development: optimizations, design patterns and implementation techniques.

Course Objectives

At course completion the student will be able to perform the following tasks:


  • Understand the role of Enterprise JavaBeans in enterprise-level systems development, and its relationship to other J2EE technologies such as JSP, servlets, JMS, CORBA, and XML
  • Understand the EJB architecture: the role of the EJB container in mediating contact between the client and the bean, transaction control, authorization control, and the importance of object pooling
  • Understand the development cycle for beans: Java source code and compilation, XML deployment descriptors, EJB compilation and deployment, and use by an application server
  • Understand the role of entity beans, their lifecycle and interactions with the container
  • Develop and test BMP and CMP entity beans and understand the importance of each of the entity-bean methods in assisting the container in pooling
  • Understand the role of session beans, their lifecycle and interactions with the container
  • Develop and test stateless and stateful session beans and effectively manage passivation/activation cycles
  • Use the bean context interfaces to assist with persistence code and to correctly establish bean-to-bean communication
  • Understand the EJB transaction architecture and apply transaction attributes to EJB systems
  • Understand the EJB security architecture and apply roles and authorization attributes to EJB systems
  • Tune EJB application servers and EJB code for performance
  • Understand and apply design patterns that are important to common distributed systems and EJB systems in particular
Prerequisites

Solid Java programming experience is a must. Our Java Programming course is good preparation for this module. Some experience with distributed systems development, especially object-based systems such as Java RMI, CORBA, or COM is a plus. Some knowledge of JDBC is needed to understand the EJB persistence model.

TOPICS COVERED IN LECTURE & LAB

Module 1: Introduction to Enterprise JavaBeans

The EJB Architecture

  • EJB and the Java Enterprise Platform
  • Common Enterprise Requirements
  • Role of the Application Server
  • The EJB Container
  • Persistence Architecture – Entity Beans
  • Object Pooling
  • Session Architecture – Session Beans
  • Transactions
  • Security
EJB Development

  • Remote Interface
  • Home Interface
  • Bean Class and Echoes of the Remote and Home Interfaces
  • Primary Key Class
  • Deployment Descriptor
  • EJB Environment
  • Build and Deployment Process
  • Home Object
  • EJB Object
Entity Beans

  • Instance versus Incarnation – Similarities to the CORBA PSS
  • Objects as Incarnations
  • EntityBean Interface and Responsibilities
  • Primary Keys
  • Object Pooling
  • EntityContext Interface and Discovering the Primary Key
  • Creation and Removal
  • Load and Store
  • Finder Methods
Bean-Managed Persistence

  • Finding a Data Source
  • Working to a Relational Database
  • Non-Relational Data Sources
  • Bean Environment – Declaring Resource References
  • Creation and Removal – INSERT and DELETE
  • Returning Primary Keys and Home Object Translation
  • Load and Store – SELECT and UPDATE
  • Finder Methods – more SELECTing
Container-Managed Persistence

  • Declarative versus Programmatic
  • Declaring a Data Source
  • What the Container Does
  • 1.1 Architecture
  • 2.0 Architecture
  • CMP Limitations
  • O/R Mapping Tools
Session Beans

  • Representing the Client
  • Session Management and Conversational State
  • Stateless Session Beans
  • Finding Entity Beans
  • Bean Environment – Declaring EJB References
  • Bean-to-Bean Communication
  • Stateful Session Beans
  • Object Pooling and Passivation/Activation
Module 2: Effective Enterprise JavaBeans

EJB Security

  • The Need for Security
  • Authentication
  • Authorization Model
  • Declarative Authorization and Roles
  • Abstract Roles and Application Assembly
  • Actual Roles and Deployment
  • Programmatic Authorization
  • Identifying the Caller
EJB Transactions

  • The Need for Transactions
  • ACID Properties
  • Declarative Transactions
  • Transaction Attributes and Isolation Levels
  • Scenarios
  • Programmatic Transactions
  • EJB Context and Monitoring the Transaction
  • SessionSynchronization Interface
Best Practices in EJB Development

  • The Bean Environment
  • Creation and Finder Semantics
  • Common Transaction Models
  • Designing for Latency
  • Serializable Records
  • When Not to Use EJB
  • Flyweights versus EJB Pooling
  • Entity Bean Optimizations
Appendix A. References

Policy