Developing Java EJB Applications

Course:   JAVAEJB
Duration:   5 Days
Level:   II
On our website at:   http://www.verhoef-training.com/courses/JAVAEJB.html
 
Course Summary

This course gives the experienced Java developer a thorough grounding in Enterprise JavaBeans -- the Java EE standard for scalable, secure, and transactional business components. EJB 3.0 has reinvigorated this area of Java enterprise development, with dramatic improvements in ease of use and smooth integration with servlet-based or JSF web applications. This course treats the 3.0 specification, with a few notes on 2.1 compatibility but an emphasis on doing things the 3.0 way.

Students get an overview of the EJB rationale and architecture, and then dive right into creating session beans and entities. The new dependency-injection features of EJB3 cause perhaps the most confusion, so we work through a chapter devoted explicitly to DI and JNDI, and basically how components find each other to make an application. We study entities and the Java Persistence API in depth, and get a look at message-driven beans as well. The latter phase of the course covers advanced topics including transactions, security, and interceptors.

This version of the course is designed to be appropriate for any EJB-capable Java Application Server, including Websphere, Oracle/Weblogic, JBOSS, and others.

Topics Covered In This Course

Overview

  • Enterprise Applications
  • Containers and Objects
  • Three Containers
  • Remote Connectivity
  • Scalability and Availability
  • Security
  • Transaction Control

Architecture

  • What is an EJB?
  • Types of Beans
  • Inversion of Control
  • The Bean-Type Annotations
  • Dependency Injection
  • The @EJB Annotation
  • Deploying EJB Applications
  • Configuring Data Sources
  • Development Cycle and Roles

Session Beans

  • Interface/Implementation Split
  • Stateful vs. Stateless
  • The @Stateless Annotation
  • Lifecycle and State Transitions
  • Session Context
  • The @Stateful Annotation
  • State Transitions
  • Singletons and Pools

Entities

  • The Java Persistence API
  • Persistence Annotations
  • Configuration by Exception
  • ORM Annotations
  • The EntityManager
  • Acquiring and Using the EntityManager
  • persistence.xml
  • @Enumerated and @Temporal Types

Associations

  • Associations, Cardinality, and Ownership
  • Annotations
  • Unidirectional vs. Bidirectional
  • The @Embedded Annotation

Java Persistence Query Language

  • OO Query Languages
  • The FROM Clause and Directionality
  • The WHERE Clause
  • The SELECT Clause
  • Joins
  • Aggregates and Grouping
  • Ordering

Dependency Injection

  • Interdependent Systems
  • The Factory Pattern
  • The Service Locator Pattern
  • Dependency Injection
  • Injection by Magic?
  • Injection by Type
  • Injection by Name
  • The Component Environment
  • Deployment Descriptors
  • Impact on Stateful Session Beans
  • JNDI
  • Connecting to a Remote Bean
  • Using mappedName
  • Who Can Declare Dependencies

Message-Driven Beans

  • Asynchronous Messaging
  • The Java Message Service
  • Message-Driven Beans
  • Message Types
  • Injecting JMS Queues
  • JMS Configuration

Transactions

  • ACID Transactions
  • The EntityTransaction Interface
  • EJB Transaction Attributes
  • Persistence Contexts
  • Extended Persistence Contexts
  • Isolation Levels
  • Application-Managed Persistence
  • The SessionSynchronization Interface
  • Impact on JMS and MDBs

Exception Handling

  • Java Exceptions
  • Remote Exceptions
  • EJB Exception Handling
  • System Exceptions
  • Application Exceptions
  • Transaction Control

Security

  • Authentication and Authorization
  • Declarative Authorization
  • Abstract Roles
  • Concrete Realms
  • Configuring User Realms
  • Programmatic Authorization
  • Run-As Identity

Interceptors

  • EJB and AOP
  • The Intercepting Filter Pattern
  • EJB Interceptors
  • Annotating Interceptor Classes
  • The InvocationContext Interface
  • Binding Interceptors to Targets
  • Shared Lifecycle and Context
  • Interceptors and MDBs

Timers

  • The EJB Timer Service
  • The TimerService Interface
  • The Timer Interface
  • Timeout Methods
  • Timer Handles
  • Transactions and Timers
What You Can Expect

On completing this course, students will be able to:

Recommended Prerequisites
Related Courses
Code Course Title Duration Level
JAVAF
Fundamentals of Java Development
5 Days
I
Details
WLEJB
Oracle WebLogic Developing Enterprise Java Beans
5 Days
I
Details

Every student attending a Verhoef Training class will receive a certificate good for $100 toward their next public class taken within a year.

You can also buy "Verhoef Vouchers" to get a discounted rate for a single student in any of our public or web-based classes. Contact your account manager or our sales office for details.