Professional Documents
Culture Documents
Duration : 5 Days
Overview:
This course introduces students to the Enterprise JavaBeans (EJB 3.0) technology and is
ideal for those who have never programmed using EJB. This course will then take students
beyond the fundamentals of Enterprise Java Bean (EJB 3.0) programming using Eclipse. This
course covers 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. In addition, students will learn about building message-driven Beans,
EJB Security, utilising Web Services technologies like JAX-WS, and managing distributed
transactions. Students will also look at the Java Persistence Query Language (JPA QL),
entity relationships, Java Interceptors, EJB Timer service, Hibernate JPA caching, EJB design
patterns, and deployment.
Target Audience:
Students should have good Java programming knowledge and should be familiar with web
application programming, including servlets and JSPs.
Pre-requisites:
This course is for students who need to take their Java EE skills further. You MUST have
attended both our Java SE courses and the JEEINT - Introduction to Java EE
Programming course or have equivalent experience (minimum 1-2 years professional coding
experience).
Module 1: Java Enterprise Edition (EE) Overview
Eclipse Platform
Eclipse Workspace
Perspectives, Views & Editors
Basic Operations with Eclipse Views and Perspectives
The Java Perspective
The Debug Perspective
Navigator View
Package Explorer
Outline View
Problems View
Eclipse Preferences
Build and Validation
Session Beans
Stateless Session Bean
Stateless Session Bean Pooling
Stateful Session Bean
Annotations
Stateless Session Bean Components
JNDI - Overview
Business Interface Details
Bean Class Details
Session Bean Lifecycle
Stateless Session Bean Lifecycle
Module 5: Stateful Session Beans
Data Persistence
Java Persistence API
Session Beans Vs Entities
Entities
Persisting and Retrieving Data
Accessing Entities
EntityManager & Persistence Unit
Persistence Context
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
Module 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
Life-Cycle Callbacks
External Callback Class
Synchronising with Databases
Entity Lookup
JPAQL (JPA Query Language)
Role of References
EJB Reference Annotations
Resource Reference Annotations
Dependency Injection
Annotation Injection
Many-to-Many
Modelling Many-to-Many
Unidirectional One-to-Many
Modelling Unidirectional One-to-Many
Relationship in JPA QL
Fetching Optimisations
Lazy vs. Eager Initialisation
Lazy Initialisation
Problems with Lazy Initialisation
Fetch Join Query
Module 11: Entity Inheritance
Inheritance
Inheritance and Entities
Inheritance Strategies
Single Table Per Class Hierarchy
Pros and Cons
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
Joined Subclasses
Table Structure: Joined Subclasses
Joined Subclasses: Pros and Cons
Which Approach To Use?
Module 12: Message-Driven Beans
Lifecycle
Transactions
Security
Load Balancing
Clustering and Topics
Clustering and Queues
Poison Messages
Building a Response
Potential Problems
Type Checking and Messages
Testing Message-Driven Beans
Module 13: EJB Security
Web Services
Operation and Implementation
WSDL
Typical Development Workflow
Advantages of Web Services
Web Services and EJB
Web Service Clients
JAX-WS Overview
JAX-WS Framework
Java to XML Data Conversion
Main Goals of JAX-WS
JAX-WS Server
WSDL Overview
WSDL Document Tags
Web Service EJBs
Annotate The Session Bean
Annotate the Methods
Service Endpoint Interface
Package and Deploy
Interceptors
Internal Interceptor
External Interceptors
Setting Class Level Interceptors
Excluding Default and Class Level Interceptors
Interceptors on Lifecycle Callbacks
Module 18: EJB Deployment