Learn your way! Get started

Java EE, Part 3 of 8: EJB 3.0 and JPA

with expert Susan Bryant


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 11/1/2010
Level Intermediate
Runtime 7h 45m
Closed captioning N/A
Transcript N/A
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

This course is introduces you to the Enterprise JavaBeans (EJB 3.0) technology and is ideal for those who have never programmed using EJB. You will learn about the core concepts regarding EJB including why they are important, differences between stateless and stateful sessions, the Java Persistence API, and the JPA Entity Lifecycle using Eclipse. You will also look at the Java Persistence Query Language (JPA QL) and entity relationships.

Prerequisites

This course is intended for intermediate to advanced Java programmers. System architects will find the advanced concepts especially beneficial in designing a framework. Students should have good Java programming knowledge and should be familiar with web application programming, including servlets and JSPs.

Learning Paths

This course will help you prepare for the following certifications and exams:
Java EE 5 Business Component Developer
Java EE 6 Enterprise JavaBeans Developer
Java EE 6 Enterprise Architect
Java EE 5 Enterprise Architect
1Z0-867: Java Enterprise Architect Certified Master Assignment for Resubmission
1Z0-865: Java Enterprise Architect Certified Master Assignment
1Z0-895: Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam
1Z0-807: Java EE 6 Enterprise Architect Certified Master Exam
1Z0-860: Java EE 5 Business Component Developer Certified Professional Exam
1Z0-864: Java EE 5 Enterprise Architect Certified Master Exam

This course is part of the following LearnNowOnline SuccessPaths™:
Java Development

Meet the expert

Susan Bryant is an experienced IT trainer and consultant with a broad array of skills. She has over 15 years experience in information systems with roles including systems consulting, project management, staff management, staff mentoring, and certified technical trainer. Susan has a strong technical knowledge of IBM WebSphere Application Server, WebSphere Portal Server, WebSphere Process Server, Lotus Domino, and web application development technologies including, Struts, JSF, EJBs and AJAX.

Course outline



Module 1

Overview (27:02)
  • Introduction (02:15)
  • Introduction (02:51)
  • Java Community Process (01:58)
  • Introduction to Java EE (04:17)
  • Why move to Java EE (04:03)
  • JAVA EE-New & Enhanced Features (03:48)
  • Java EE Software Packaging (02:10)
  • Java EE Technologies (04:58)
  • Summary (00:38)

Module 2

EJB Overview (39:49)
  • Introduction (00:40)
  • Need for EJBs (01:40)
  • Distributed Computing (01:19)
  • Distributed Transaction (01:39)
  • Distributed Security (01:35)
  • What are EJBs (01:27)
  • Main Characteristics of EJBs (01:56)
  • EJB Architecture Components (01:20)
  • EJB Client (01:37)
  • EJB JAR File (01:40)
  • EJB Container (03:15)
  • EJB Server (01:45)
  • Enterprise JavaBeans (01:45)
  • Session Beans (01:31)
  • Entity Beans (02:48)
  • Message-Driven Beans (00:40)
  • EJB Specification (02:06)
  • Demo: Eclipse (10:30)
  • Summary (00:25)

Module 3

Session Bean Intro (38:05)
  • Introduction (00:42)
  • Session Beans (01:19)
  • Stateless Session Bean (01:41)
  • Stateless Session Bean Pooling (00:30)
  • Stateless Session Bean Example (01:06)
  • Stateful Session Bean (01:50)
  • Stateful Session Bean Examples (01:11)
  • Annotations (03:14)
  • Stateless Components (02:42)
  • Example: Business Interface (00:33)
  • Example: Bean Class (01:40)
  • Alternative Example (00:42)
  • JNDI Overview (01:14)
  • Example: The Client (01:22)
  • Demo: Session Beans (17:38)
  • Summary (00:35)
Session Bean Lifecycle (21:01)
  • Introduction (00:44)
  • Business Interface Details (02:03)
  • Bean Class Details (01:33)
  • Session Bean Lifecycle (02:10)
  • Stateless Session Bean (02:15)
  • Demo: Session Bean Lifecycle (10:36)
  • Summary (01:38)

Module 4

Stateful Session Bean (39:19)
  • Introduction (00:53)
  • Stateful Session Bean (02:57)
  • Passivation (01:38)
  • Activation (00:52)
  • Session Bean Lifecycle (01:11)
  • Stateless Session Lifecycle (02:14)
  • Components (02:45)
  • Example (02:29)
  • Client (02:55)
  • Removing the Bean (01:14)
  • Demo: Stateful Session Bean (18:56)
  • Summary (01:11)

Module 5

Eclipse Database Configuration (14:57)
  • Introduction (00:51)
  • Demo: Database Configuration (01:29)
  • Perspective (00:44)
  • Configure Database Connection (02:52)
  • Create Table (03:26)
  • Configure JBoss (05:11)
  • Summary (00:20)
Intro to Entities (27:51)
  • Introduction (02:14)
  • Data Persistence (03:20)
  • Java Persistence API (01:19)
  • Entities (01:01)
  • Session Beans Vs Entities (01:40)
  • Entities (02:37)
  • Persisting and Retrieving Data (01:57)
  • Accessing Entities (00:49)
  • EntityManager & Persistence (01:13)
  • Persistence Context (00:43)
  • Entities - Example (02:16)
  • persistence.xml (02:45)
  • Demo: Intro to Entities (05:11)
  • Summary (00:40)
Working with Entities (42:43)
  • Introduction (00:36)
  • Entity Instance Lifecycle (02:36)
  • EntityManager in Session EJB (02:02)
  • EntityManager in Plain Java (01:17)
  • EntityManager Interface (02:15)
  • Transaction Basics (01:58)
  • Demo: Working with Entities (30:23)
  • Summary (01:33)

Module 6

Entities and JPA (43:42)
  • Introduction (00:34)
  • Entity Lifecycle (01:27)
  • Managed or Detached (03:40)
  • Implementing the CRUD Pattern (01:56)
  • Accessing Entities (00:51)
  • Inserting Data (01:15)
  • Retrieving Data (00:31)
  • Updating Data (00:56)
  • Deleting Data (00:25)
  • Merging Entities (03:13)
  • Demo: Entities and JPA (28:25)
  • Summary (00:24)
Life-Cycle Callbacks (35:02)
  • Introduction (00:38)
  • Life-Cycle Callbacks (03:45)
  • Example: Internal callback (00:44)
  • External Callback Class (01:18)
  • Listener Class - Example (00:24)
  • Synchronizing with Databases (02:16)
  • Entity Lookup (00:57)
  • JPA Query Language (02:22)
  • Demo: Life-Cycle Callbacks (22:04)
  • Summary (00:32)

Module 7

Reference and Injections (29:34)
  • Introduction (00:50)
  • Role of References (01:44)
  • EJB Reference Annotations (02:24)
  • Resource Reference Annotations (02:55)
  • Dependency Injection (02:06)
  • Annotation Injection (00:45)
  • Example: Field Level Injection (01:29)
  • Method Level Injection (00:46)
  • Deployment Descriptor (01:42)
  • Example: Deployment Descriptor (00:51)
  • Class Level References (00:49)
  • Multiple References (01:29)
  • Demo: Reference and Injections (11:00)
  • Summary (00:38)
Deployment Descriptors (30:00)
  • Introduction (00:34)
  • EJB References in Deployment (02:58)
  • Reference Lookup (00:57)
  • EJB Context (01:02)
  • JNDI Lookup with EJBContext (01:51)
  • Overriding Annotations (01:37)
  • Default Reference Name (01:52)
  • Resolving References (01:38)
  • mappedName Attribute (01:45)
  • Overloaded Reference Names (01:13)
  • Reference Best Practices (03:54)
  • Demo: Deployment Descriptors (09:33)
  • Summary (01:01)

Module 8

JPA Query Language (53:13)
  • Introduction (01:01)
  • JPA Query Language (02:15)
  • Basic JPAQL Syntax (01:07)
  • Simple SELECT Examples (01:16)
  • Example of Using JPAQL (01:05)
  • The SELECT Clause (01:37)
  • Reading Data from Code (02:07)
  • The WHERE Clause (08:08)
  • Using JPAQL from Session EJB (00:52)
  • Named Query (03:48)
  • Multiple Named Queries (00:52)
  • Bulk Updates (01:30)
  • Bulk Delete (00:32)
  • Running Native SQL Query (01:56)
  • Native SELECT Query (01:47)
  • Native SQL Delete and Insert (00:19)
  • Named Native Query (01:28)
  • Demo: JPAQL (21:03)
  • Summary (00:22)

Module 9

EJB Deployment (22:44)
  • Introduction (00:45)
  • Packaging EJB JAR File (02:37)
  • The Bean Classes (00:36)
  • Dependent Classes (02:04)
  • Business Interfaces (00:29)
  • Client JAR File (01:45)
  • The Deployment Descriptor (02:44)
  • Basic Deployment Descriptor (00:21)
  • Configuring a Session EJB (02:09)
  • Configure Assembly Description (02:24)
  • Demo: EJB Deployment (06:05)
  • Summary (00:39)