Training

 

 

Popular Courses

Browse Our Free Resources

  • whitepapers
  • whitepapers
  • webinars
  • blogs

Our Locations

Training Centres

Vancouver, BC
Calgary, AB
Edmonton, AB
Toronto, ON
Ottawa, ON
Montreal, QC
Hunt Valley
Columbia

locations map

Calgary

550 6th Av SW
Suite 475
Calgary, AB
T2P 0S2

Toronto

821A Bloor Street West
Toronto, ON
M6G 1M1

Vancouver

409 Granville St
Suite 902
Vancouver, BC
V6C 1T2

U.S. Office

436 York Road
Suite 1
Jenkintown, PA
19046

Other Locations

Dallas, TX
Miami, FL

Home > Training > WebSphere Application Server 8.5 Programming > EJB and JPA Programming with Java EE 6 - WebSphere 8.5 / Eclipse Training

EJB and JPA Programming with Java EE 6 - WebSphere 8.5 / Eclipse Training

Quick Enroll

Course#: WA2067

This EJB and JPA training course covers in-depth details of how to use these powerful Java EE technologies.  Although previously difficult to program, EJB components in modern applications are simple yet provide many powerful features like transactional behavior and fine-grained security. Combined with the simplicity of the Java Persistence API using EJB and JPA technology together is an excellent synergy built into the Java EE standards. Using these technologies could help you create applications that leverage more of the Java EE standards and depend less on third party libraries like Spring and Hibernate. This course will show you how to use the features of both of these technologies, including some of the new features introduced in Java EE 6.

Labs are done using the new Eclipse tools for WebSphere.

Objectives

 

This class combines lecture with hands-on experience, and open ended discussion that will help the developer quickly understand the various backend technologies available with Java EE 6. Upon completion of the course, students will:

  • Develop business logic layer using EJB 3.1
  • Use various EJB features like Singleton EJBs, Asynchronous EJBs, and EJB Timers
  • Persist data using Java Persistence (JPA)
  • Define relationships in JPA Entities
  • Query data using JPA Query Language and Criteria Queries
  • Use CDI (Contexts and Dependency Injection) to perform type-safe dependency injection of components

Topics

 
  • EJB Overview
  • Session Beans
  • Contexts and Dependency Injection (CDI)
  • Java Persistene API (JPA)
  • Transactions
  • Security
  • Message-Driven Beans

Audience

  Software designers, developers and programmers new to Java EE or with J2EE 1.4 or earlier experience

Prerequisites

 

Participants should already have an understanding of Java programming. For those that require Java experience before this course the following course is suggested:

Duration

  Five days

Outline of WA2067 EJB and JPA Programming with Java EE 6 - WebSphere 8.5 / Eclipse Training

Chapter 1. Overview of Enterprise JavaBeans (EJB)

  • Need for EJBs
  • Distributed Computing
  • Distributed Transaction
  • Distributed Security
  • What are EJBs?
  • Main Characteristics of EJBs
  • EJB Client
  • EJB Container
  • Enterprise JavaBeans
  • Session Beans
  • Message-Driven Beans (MDBs)
  • Stateless Session Bean
  • Annotations
  • Stateless Session Bean Components
  • Example: Business Interface
  • Example: Bean Class
  • Business Interface Details
  • Summary

Chapter 2. Stateful Session EJB

  • Stateful Session Bean
  • Stateful Session Beans
  • Session Bean Lifecycle
  • Stateful Session Bean Lifecycle
  • Stateful Session Bean Example
  • Stateful Session Bean Client
  • Removing the Bean
  • Summary

Chapter 3. Overview of Contexts and Dependency Injection

  • Once upon a time
  • What is CDI?
  • The JSRs
  • CDI Example
  • What Good is DI
  • Old Bean Scope
  • CDI Bean Scope
  • Other Advanced Features of CDI
  • CDI Implementation
  • Summary

Chapter 4. Defining CDI Beans

  • Requirements of Bean Classes
  • Bean Initialization Methods
  • beans.xml
  • Managed Bean Type
  • Using Beans with EL
  • Beans Have Default Names
  • Bean Scopes
  • EJBs in CDI
  • Summary

Chapter 5. Dependency Injection in CDI

  • Injection Points
  • @Inject
  • Typesafe Resolution
  • @Qualifier
  • Using an @Qualifier
  • Alternatives
  • The Client Proxy
  • Summary

Chapter 6. Overview of Java Persistence API

  • Data Persistence
  • Java Persistence API
  • Entities
  • Session EJB vs JPA Entities
  • Entities
  • Persisting and Retrieving Data
  • Accessing Entities
  • EntityManager & Persistence Unit
  • Persistence Context
  • Entities - Example
  • persistence.xml – Hibernate Provider
  • persistence.xml – Open JPA Provider
  • persistence.xml - Toplink
  • Entity Instance Lifecycle
  • Creating EntityManager in Session EJB
  • Creating EntityManager in a Plain Java Class
  • Working With the EntityManager Interface
  • Transaction Basics
  • Summary

Chapter 7. JPA Entity Lifecycle

  • Entity Lifecycle
  • When is an Entity Managed or Detached?
  • Implementing the CRUD Pattern
  • Accessing Entities Using Stateless Session Beans
  • Inserting Data
  • Retrieving Data
  • Updating Data
  • Deleting Data
  • Merging Entities
  • Merging Entities (example)
  • Life-Cycle Callbacks
  • Example: Internal callback
  • External Callback Class
  • Listener Class - Example
  • Synchronizing with Databases
  • Entity Lookup
  • JPAQL (JPA Query Language)
  • Summary

Chapter 8. Java Persistence Query Language (JPA QL)

  • JPA Query Language
  • Basic JPAQL Syntax
  • Simple SELECT Examples
  • Example of Using JPAQL
  • The SELECT clause
  • Reading Data from Code
  • The WHERE Clause
  • Example Using JPAQL from Session EJB
  • Named Query
  • Multiple Named Queries
  • Bulk Updates
  • Bulk Delete
  • Running Native SQL Query
  • Native SELECT Query
  • Native SQL Delete and Insert
  • Named Native Query
  • Summary

Chapter 9. JPA Criteria Queries

  • Dynamic Queries with JPA Criteria API
  • Comparison to JPA QL
  • Obtaining a CriteriaQuery Object
  • The CriteriaBuilder Class
  • Adding Criteria Restrictions
  • Entity Metamodel and Relation to Criteria Queries
  • Relationships in Criteria Queries
  • Summary

Chapter 10. Basic JPA Entity Relationships

  • Relationship Between Entities
  • Anatomy of a Relationship
  • Foreign Key
  • Example Schema
  • One-to-One Unidirectional
  • Creating Entity Instances
  • Traversing the Relationship
  • The Cascade Behavior
  • One-to-One Bidirectional
  • Maintaining Bidirectional Links
  • Simplifying Bidirectional Links
  • Traversing the Relationship
  • Summary

Chapter 11. Complex Entity Relationships

  • One-To-Many and Many-To-One
  • Many-to-One Unidirectional
  • Creating Entity Instances
  • Traversing the Relationship
  • Modeling One-to-Many
  • Maintaining Bidirectional Links
  • Creating Entity Instances
  • Traversing the Relationship
  • Many-to-Many
  • Modeling Many-to-Many
  • Maintaining Bidirectional Links
  • Creating Entity Instances
  • Traversing Relationship
  • Unidirectional One-to-Many
  • Modeling Unidirectional One-to-Many
  • Creating Entity Instances
  • Traversing the Relationship
  • Relationship in JPA QL
  • Fetching Optimizations
  • Lazy vs. Eager Initialization
  • Lazy Initialization
  • Various Problems with Lazy Initialization
  • Fetch Join Query
  • Summary

Chapter 12. JPA Entity Inheritance

  • Inheritance
  • Inheritance Example
  • Inheritance and Entities
  • Inheritance Strategies
  • Strategy 1: Single Table Per Class Hierarchy
  • Single Table Per Class Hierarchy
  • Table Structure: Single Table Per Class Hierarchy
  • Pros and Cons
  • Strategy 2: Table Per Concrete Class
  • Table Per Concrete Class
  • Table Per Concrete Class: JBoss Warning
  • Table Per Concrete Class
  • Table Structure: Table Per Concrete Class
  • Table Per Concrete Class: Pros and Cons
  • Strategy 3: Joined Subclasses
  • Joined Subclasses
  • Table Structure: Joined Subclasses
  • Joined Subclasses: Pros and Cons
  • Which Approach To Use?
  • Summary

Chapter 13. JPA Caching

  • Need for Caching
  • Factors Involved in Caching
  • When to NOT Use Caching
  • Configuring the Cache
  • Marking JPA Entities as @Cacheable
  • What the JPA Specification Does NOT Specify
  • Summary

Chapter 14. Message Driven EJBs

  • Asynchronous Messaging Features
  • Message-Oriented Middleware
  • Messaging Domains
  • Publish/Subscribe
  • Point-to-Point
  • Java Message Service
  • JMS Programming: Overview
  • JMS Programming: Overview…
  • The JMS Interfaces
  • Message Driven EJBs
  • Message-Driven Bean Interfaces
  • javax.jms.MessageListener
  • javax.jms.Message
  • Specialized Message Types
  • Message Driven Bean - Example
  • Summary

Chapter 15. Asynchronous Session EJB

  • Previous Options
  • Asynchronous EJB Calls
  • Return Values
  • Relationship With Java SE Concurrent Programming
  • Asynchronous Client Models
  • Throwing Exceptions From Asynchronous Methods
  • Summary

Chapter 16. Singleton Session EJBs

  • Singleton Beans
  • Initializing Singletons at Startup
  • Singleton Dependence
  • Destruction
  • Singleton Concurrency
  • Concurrency Lock Types
  • Restriction on Singleton Beans
  • Singletons in Clusters
  • Summary

Chapter 17. EJB Timer Service

  • Container Managed Timer Service
  • The Timer Service
  • Interaction between Timer Service and EJB
  • Timer Service API
  • The TimerService Interface
  • Creating a Timer
  • Getting All Timers
  • The Timeout Callback method
  • The Timer Interface
  • Example: TimerTestBean
  • Timer and Transaction
  • Calendar-based Timer
  • Scheduling Timer Execution
  • The @Schedule Annotation
  • Schedule Attribute Syntax
  • Scheduling Examples
  • The ScheduleExpression Class
  • Non-persistent Timers
  • Non-persistent Timers in Clusters
  • Summary

Chapter 18. Transactions in EJB

  • Need for Transactions
  • Transactions
  • ACID Properties
  • Transaction Components
  • Distributed Transactions
  • Distributed Transaction Components - Two Phase Commit
  • Java Transaction API (JTA)
  • Object Transaction
  • EJB Transaction Basics
  • Transaction Propagation
  • Transaction Outcome
  • Container Managed Transaction
  • Transaction Attributes
  • Container Managed Transaction Settings
  • Interacting with Container Managed Transactions
  • Container Managed Transaction – Example
  • Transaction Attributes Support
  • Bean Managed Transaction
  • Using the JTA API
  • Obtaining the UserTransaction
  • Fine Points of Bean Managed Transaction
  • Client Managed Transaction
  • Transaction Isolation
  • Summary

Chapter 19. EJB Security

  • Introduction
  • How EJB Security Works
  • Example Security
  • Protecting Web Resources
  • Setting EJB Method Permission
  • Defining Roles in DD
  • Defining Roles in Code
  • Specify Role Access in DD
  • Specify Role Access in Code
  • Disable Security Check
  • The Excludes List
  • Run As Identity
  • Setting Run As Role
  • Programmatic EJB Security
  • Programmatic EJB Security Example
  • Role Reference
  • Summary

Chapter 20. EJB Testing

  • EJB Unit Testing
  • Embeddable Container
  • Initializing the Embeddable Container
  • Supported EJB Features in Embeddable Container
  • Summary
Address Start Date End Date
Instructor Led Virtual 10/30/2017 11/03/2017
We regularly offer classes in these and other cities. Atlanta, Austin, Baltimore, Calgary, Chicago, Cleveland, Dallas, Denver, Detroit, Houston, Jacksonville, Miami, Montreal, New York City, Orlando, Ottawa, Philadelphia, Phoenix, Pittsburgh, Seattle, Toronto, Vancouver, Washington DC.
*Your name:

*Your e-mail:

*Phone:

*Company name:

Additional notes:

We have received your message. A sales representative will contact you soon.

Thank you!.

more details
buy this course

10/30/2017 - Online Virtual
$2,595.00
Enroll

Register for a courseware sample

It's simple, and free.

 

Thank You!

You will receive an email shortly containing a link to download the requested sample of the labs for this course.