WA1557 EJB Programming with Rational Application Developer (RAD) v7.0 Training and Courseware Course Outline

1. Introduction to Rational Application Developer (RAD) v7.0

  • Objectives
  • The RAD 7 Product
  • Eclipse Platform
  • Rational Web Developer
  • Rational Application Developer
  • Key Features in RAD v7.0
  • Views, Perspective, and Editor Areas
  • Basic Operations with RAD Views and Perspectives
  • The Java Perspective
  • The Debug Perspective
  • Navigator View
  • Package Explorer
  • Outline View
  • Task and Problems View
  • Build and Validation
  • Import and Export Project
  • Code Completion, Templates and Snippets
  • Searching
  • Setup Compiler Class Path
  • JRE Switching
  • Refactoring
  • Changing Class Name
  • Changing Method Name
  • Changing Variable Name
  • Moving a Class to a Different Package
  • Extracting Code to a Method
  • Pull Up and Push Down Methods
  • Migrating Workspace from RAD v6
  • Project Interchange Feature
  • Migrating J2EE Applications
  • J2EE Migration Wizard
  • Summary
 

2. J2EE Overview

  • Introduction
  • Why Do We Need J2EE?
  • J2EE Components
  • J2EE Technologies
  • Useful J2SE Technologies
  • Application Artifacts
  • J2EE Architecture
  • J2EE 1.4 Version Levels
  • J2EE Software Packaging
  • Deployment Descriptor
  • Enterprise Archive (EAR)
  • Web Modules and WAR
  • EJB Modules
  • Building Module Dependency
  • Objectives
  • Project Explorer
  • Servers View
  • The J2EE Perspective
  • The Web Perspective
  • Create an Enterprise Application
  • Setup Utility JAR
  • Create an EJB Project
  • Create a Web Project
  • Setup Dependent JAR Files
  • Create Server Instance and Server Configuration
  • Configure Server Instance
  • Add an Enterprise Application Project to the Test Server
  • Start and Stop the Server
  • Test a Servlet
  • Debug a servlet
  • Test a JSP
  • Debug a JSP
  • Summary
 

3. Enterprise JavaBean (EJB) Overview

  • Objectives
  • Needs for EJB
  • Distributed Computing
  • Distributed Transaction
  • Distributed Security
  • What are EJBs?
  • Main Characteristics of EJBs
  • EJB Remote Method Call
  • EJB Architecture Components
  • EJB Client
  • EJB JAR File
  • EJB Server
  • EJB Container
  • EJB Container - Persistence
  • EJB Container - Transaction
  • Enterprise Java Beans
  • Session Beans
  • Entity Beans
  • EJB Classes and Interfaces
  • Basic Components of Entity and Session Beans
  • EJB Home Interface
  • An EJB Home Interface Example
  • EJBHome Object
  • EJB Remote Interface
  • Remote Interface Example
  • EJB Local Home Interface
  • EJB Local Interface
  • Remote EJB Objects
  • Local EJB Objects
  • EJB Implementation Class
  • Remote v. Local EJBs
  • EJB Application Development
  • Deploying Enterprise Beans
  • Major Components of Deployed EJBs
  • Summary
 

4. Session Bean

  • Objectives
  • Session Beans
  • Stateless Session Bean
  • Stateful Session Bean
  • Components of Session Beans
  • Home Interfaces
  • Remote interface
  • Local interface
  • Service Endpoint Interface (SEI)
  • The Session Bean Class
  • ejbCreate() Method
  • Business Methods
  • A Simple Stateless Session Bean Example
  • A Simple Stateful Session Bean Example
  • Registering Artifacts in ejb-jar.xml
  • Session Context
  • EJB Context
  • EJB Context
  • Session Bean Lifecycle
  • Lifecycle - Stateless
  • Lifecycle - Stateful
  • Lifecycle Stateful
  • Lifecycle - Stateful
  • Concurrency Issues
  • Invoking Session Beans from Client Application
  • Looking Up a Home Object
  • EJB Reference
  • Create an EJB Object
  • Calling Business Methods
  • IBM RAD for EJB Development
  • Developing a Session Bean using RAD
  • EJB Project in RAD
  • Create an EJB Project
  • Examine the EJB Project
  • Create a Session Bean
  • Code Methods
  • Promote Methods to Interfaces
  • Deploying EJBs
  • EJB Deployment Descriptor
  • Generating Deployed Code
  • Run on Server
  • JNDI Explorer
  • Test the Home Interface
  • Test the Component Interface
  • EJB JAR File Structure
  • EJB Client JAR File Structure
 

5. EJB Timer Service

  • Container Managed Timer Service
  • EJB Timer Service
  • Interaction between Timer Service and EJB
  • Timer Service API
  • The TimerService Interface
  • Creating a Timer
  • Getting All Timers
  • The TimedObject Interface
  • The Timer Interface
  • Example Of A TimerBean
  • Timer and Transaction
  • Limitations of EJB Timer Service
 

6. Entity Bean

  • Objectives
  • Entity Beans
  • Persistence
  • Entity Bean Components
  • Container
  • Container
  • Container
  • Primary Key Class
  • A Primary Key Class Example
  • (Remote) Home Interface
  • (Remote) Home Interface
  • (Remote) Home Interface
  • Local Home Interface
  • Remote Interface
  • Local Interface
  • Entity Bean Class
  • Entity Instance
  • Entity Object Lifecycle
  • Bean Instance Lifecycle
  • Bean Instance Lifecycle
  • Bean Instance Lifecycle
  • Bean Managed Persistence
  • Container Managed Persistence
  • Writing BMP Bean
  • Writing BMP Bean
  • Writing BMP Bean
  • Writing BMP Bean
  • A BMP Bean Example
  • A BMP Bean Example
  • A BMP Bean Example
  • Writing a CMP Bean
  • Indicating Persistent Fields
  • Writing a CMP Bean
  • Writing a CMP Bean
  • Example Bean Class
  • Deployment Descriptor Settings
  • Writing finder methods
  • EJB Query Language
  • EJBQL: Simple examples
  • EJBQL: SELECT clause
  • EJBQL: SELECT clause
  • EJBQL: FROM clause
  • EJBQL: WHERE clause
  • EJBQL: WHERE clause
  • EJBQL: WHERE clause
  • EJBQL: WHERE clause
  • EJBQL: WHERE clause
  • EJBQL: Watch out!
  • Using EJBQL in a CMP bean
  • Business Methods
  • EntityContext
  • Writing CMP Beans
  • Defining and Mapping CMP Fields
  • Developing Entity Beans in RAD
  • Adding a CMP Entity EJB
  • EJB Deployment Descriptor
  • Add an EJBQL Query
  • Create a Physical Data Model
  • Creating a Database Mapping
  • Choosing a Backend
  • Choosing a Mapping Type
  • Specifying the Mapping
  • EJB 2.0 Relationships
  • WebSphere Extensions
 

7. EJB Inheritance

  • The Need For EJB Inheritance
  • EJB Inheritance
  • Characteristics of a Child EJB
  • Table Mappings
  • Single Table Mapping
  • Root/Leaf Table Mapping
  • Guidelines and Limitations
  • ibm-ejb-jar-ext.xmi
  • Creating EJB Inheritance
  • Mapping To RDB: Parent
  • Mapping To RDB: Child
 

8. Message-Driven Beans

  • Objectives
  • The Trouble with RMI/IIOP
  • Messaging to the Rescue
  • Messaging Features
  • Message-Oriented Middleware
  • Messaging Domains
  • Publish/Subscribe
  • Point-to-Point
  • Java Message Service
  • JMS Programming: Overview
  • JMS Programming: Overview
  • The JMS Interfaces
  • JMS Programming: Example
  • JMS Programming: Example
  • JMS Programming: Example
  • Integrating JMS and EJB
  • Message-Driven Beans Are Different From Other EJBs
  • Message-Driven Beans Cannot Talk to Their Clients
  • Message-Driven Beans are Stateless
  • Durable Subscription
  • Message-Driven Bean Interfaces
  • javax.ejb.MessageDrivenBean
  • javax.jms.MessageListener
  • javax.jms.Message
  • Lifecycle
  • Example: Message Counter
  • Class MessageCounter
  • Class MessageCounter
  • Class MessageCounter
  • Working With Messages
  • Processing the Message
  • Deployment Descriptor Entry
  • Binding the Queue or Topic
  • Transactions
  • Security
  • Load Balancing
  • Clustering and Topics
  • Clustering and Queues
  • A Few Tips
  • Poison Messages
  • How the Programmer Can Avoid Poison Messages
  • How the System Administrator Can Avoid Poison Messages
  • Building a Response
  • Potential Problems
  • A Simple Alternative
  • Type Checking and Messages
  • Testing Message-Driven Beans
  • Summary
  • References
 

9. EJB Transaction

  • Transaction Management
  • Object Transaction
  • EJB Transaction Basics
  • Transaction Propagation
  • Client Managed Transaction
  • Bean Managed Transaction
  • Container Managed Transaction
  • Transaction Outcome
  • Vetoing a Transaction
  • Vetoing a Transaction
  • Transaction Isolation
  • Isolation Level
 

10. EJB Exception

  • Objectives
  • Use of Exception
  • Exception Types
  • System Exception
  • System Exception
  • Application Exception
  • Bean Class
  • Container
  • Client
  • Standard Exceptions
  • Local EJBs
  • Summary
 

11. J2EE Security

  • Security Functionality
  • What Can You Secure in J2EE?
  • Challenge Mechanism
  • Basic Challenge
  • Client Certificates
  • Form-based Authentication
  • User Registry
  • J2EE Authorization Model
  • Protecting Web Resources
  • Protecting EJB Methods
  • EJB Delegation Policies
  • Delegation Scenario
  • Defining Roles at Application Level
  • Goals of the EJB Security Specification
  • Setting Method Permission
  • Defining Roles
  • Specify Accessible Methods for a Role
  • Disable Security Check
  • Excludes List
  • Security Identity (Delegation Policy)
  • Programmatic EJB Security
  • Role Reference
  • Security Configuration
  • User Registry
  • User Registry Configuration
  • Configure the LDAP User Registry
  • Challenge Mechanism
  • Authorization
  • J2EE Roles
  • Sample Role Mapping
  • Mapping Roles to Users/Groups
  • Look Up Users/Groups
  • Special Roles
  • Defining Roles
  • Resource Mappings Web Module
  • Resource Mappings EJB Module
  • "Unchecked" Method Permissions
  • Unprotected Methods
  • Run-As Delegation
  • Configuring Run-As Delegation
  • Reference
 

12. Business and Integration Tier Patterns

  • Objectives
  • Business Delegate Pattern
  • How it works
  • Data Transfer Object Pattern
  • DTO Example (Output)
  • DTO Example (Input)
  • Role of DTO in MVC
  • Access Beans
  • Types of Access Beans
  • Data Class Access Bean
  • Data Class Programming Model
  • Access Bean Constructor
  • Generating Access Beans
  • Generating a Data Class
  • Generating an EJB Factory
  • Using EJB Factory and Data Class
  • Deleting the Access Bean
  • Value Object Pattern
  • Multiple Value Objects
  • Best Practice derive EJB from the Value Object
  • Composite Entity Pattern
  • An example
  • Class Diagram
  • How the client interacts
  • Value Object Assembler
  • Value List Handler
  • How does it work?
  • How does it work - continued
  • Design Considerations
  • Service Locator
  • Data Access Object (DAO)
  • DAO Implementation Guidelines
  • Service Activator
  • MDB- Integrating JMS and EJB
  • Message-Driven Beans Are Different From Other EJBs
  • Message-Driven Beans are Stateless
  • Message-Driven Bean Interfaces
  • Example: Message Counter
  • Class MessageCounter
  • Class MessageCounter
  • Class MessageCounter
  • Processing the Message
  • Deployment Descriptor Entry
  • Summary
 

13. Other EJB Patterns

  • Objectives
  • Session Fa ade
  • Session Fa ade Pattern
  • Session Fa ade
  • Session Fa ade
  • Session Facade
  • Miscellaneous Details
  • Message Fa ade Pattern
  • Message Fa ade
  • Message Fa ade
  • Message Fa ade
  • Message fa ade pattern shortcomings
  • Version Number pattern
  • Version Number Pattern
  • Sequence Blocks
  • Stored Procedures for Autogenerated Keys
  • Fast Lane Pattern
  • Summary
 

14. J2EE Application Deployment

  • Objectives
  • Overview
  • Generate Deployed Code
  • Export EAR
  • Separate Client Side Code
  • Export EJB Client JAR
  • Export Utility JAR
  • J2EE Deployment
  • Administrative Console
  • Environment Variables
  • Security
  • Resources
  • Creating JDBC Provider
  • Creating Data Source
  • WebSphere MQ JMS Configuration
  • WebSphere MQ JMS Provider
  • Connection Factory
  • Destination
  • Listener Port
  • Relationship Between Messaging Components
  • Installing Applications
  • Server Options
  • Starting an Application
  • Summary