Fast Track to EJB 3.0 and JPA - JAV855

The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity from the developer's point of view. It leverages annotations (introduced in Java 5) and Object-Relational Mapping (ORM) technologies to eliminate the dependence on complex EJB APIs, allow POJO (Plain Old Java Object) based development, and provide an effective technology for creating distributed, transactional components, and for mapping relational data to an object schema. This course provides thorough coverage of the EJB3 technology including new concepts such as the use of annotations and the use of Dependency Injection to initialize references. This course also includes in-depth coverage of managing persistence using the Java Persistence API (JPA). It uses hands-on labs and a well-paced approach to make this complex technology understandable in an accelerated fashion. You will come away with a comprehensive understanding of EJB and the important issues that need to be considered to use it in real world applications.
Course ID: JAV855

Duration: 4 days

Audience: Java developers who want to use EJB3.

Prerequisites: One year of Java programming experience (or equivalent) is preferred. Knowledge of relational databases and JDBC is strongly recommended
Topics:

Overview

  • What is EJB?
  • EJB Goals
  • Types of Enterprise JavaBeans
  • Java Persistence API
  • EJB and Java EE (Enterprise Editions)
  • EJB in Java EE Architecture
  • SOA and EJB
  • SOA with Web Services and EJB

EJB 3.0

  • EJB 3.0 Overview
  • EJB 2.X Problems
  • EJB 3.0 Goals
  • Session Bean Usage
  • Persistent Entity Usage
  • MDB Usage

Session Bean Overview

  • What are Session Beans?
  • Stateless Session Beans (SLSB)
  • Stateful Session Beans (SFSB)
  • Session Bean can be Distributed
  • Defining a Session Bean
  • Stateless Session Bean Definition
  • Calculator Remote Business Interface
  • Remote and Local Business Interfaces
  • Calculator Bean Local Business Interface
  • A Brief Note on Annotations
  • How Annotations Work
  • Annotation Definition
  • Using Annotations
  • What Else is Needed?

Packaging and Deployment

  • J2EE Packaging
  • EJB-JAR File
  • Deployment Descriptor (DD)
  • Deployment Descriptors in EJB 3
  • EJB-JAR File Structure
  • Enterprise Archive (EAR File)
  • application.xml File
  • Server Deployment
  • EJB Container
  • The EJB Container
  • Server Deployment

JNDI Overview

  • How do Remote Clients get EJB Access?
  • JNDI - Java Naming and Directory Interface
  • EJB Container Binds a Reference into JNDI
  • Client Looks up Reference in JNDI
  • JNDI Tree Structure
  • JNDI API Overview
  • JNDI API
  • The Context Interface
  • The InitialContext Class
  • Specifying the InitialContext Properties
  • Using JNDI

EJB Client

  • Client View of a Session Bean
  • Client Invocation of a Session EJB
  • PortableRemoteObject and Casting
  • Running a Client

Dependency Injection

  • Dependency Injection
  • The JavaTunes Online Music Store
  • An EJB Referencing Another EJB
  • CatalogMaintenance
  • Injection of CatalogMaintenance
  • What is Happening

Deployment Descriptors

  • More About Deployment Descriptors
  • The XML Deployment Descriptor

The EJB Environment

  • Issues with Obtaining Resources
  • Referencing Resources External to EAR
  • Reference and Deployment Descriptor Usage
  • Resolving a JNDI Name
  • Simple Environment Entries
  • Declaring Simple Environment Entries
  • Setter Injection
  • Resource Manager Connection Factories
  • More on the Enterprise Bean Environment
  • The Environment is a Level of Indirection
  • Looking up Resources in the Environment
  • Looking up via EJBContext
  • Looking up via JNDI API
  • More on the @Stateless Annotation
  • More on the @EJB Annotation
  • More on the @Resource Annotation
  • Deployment Descriptor vs Annotation

Stateless Session Bean Lifecycle and Interceptors

  • Stateless Session Bean State Diagram
  • Lifecycle of SSB
  • Client Call of a Stateless SB Method
  • Interceptors
  • Business Method Interceptors
  • InvocationContext Interface Details
  • Interceptor Method Details
  • Interceptor Class
  • Using Interceptor Classes
  • Method Level Interceptors
  • Lifecycle Callback Interceptors
  • Lifecycle Interceptor in the Bean Class
  • Lifecycle Interceptor in a Separate Class

Stateful Session Beans

  • Stateful Session Bean (SFSB) Overview
  • Coding a Stateful Session Bean
  • Stateful Session Bean Clients
  • Stateful Sess
 

Call Toll-free 877-245-6815 or 303-416-3056 to set up your IT Training today.