Skip Ribbon Commands
Skip to main content

JavaBeans - Enterprise JavaBeans Version 3.x


Duration: 5 Days




Delivery Method:

Software Assurance Value:

Microsoft CPE:

Course Information

Course Description

​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 work with the Java EE 5 SDK, Update 7, which includes the GlassFish application server, version 2.1, and TopLink as the JPA provider. Variants of the course are also available with specific support for recent versions of JBoss and WebLogic. This course shows Java-1.4 developers the new language features in Java 5 and 6, and, more importantly, illustrates best programming practices as they've been affected by these new features. This is an accelerated course that assumes long experience with earlier versions of Java. Students will leave familiar with various new bits of syntax, and also with an understanding of the exciting new options they have for API design and general-purpose Java 6 coding.

Course Objectives

Course Audience

Course Outline

Chapter 1. Overview
  • Enterprise Applications
  • Containers and Objects
  • Three Containers
  • Remote Connectivity
  • Scalability and Availability
  • Security
  • Transaction Control
Chapter 2. Architecture
  • What is an EJB?
  • Types of Beans
  • Inversion of Control
  • The Bean-Type Annotations
  • Dependency Injection
  • The @EJB Annotation
  • The GlassFish Application Server
  • The Administration Console
  • Deploying EJB Applications
  • Configuring Data Sources
  • Development Cycle and Roles
Chapter 3. 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
Chapter 4. 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
Chapter 5. Associations
  • Associations, Cardinality, and Ownership
  • Annotations
  • Unidirectional vs. Bidirectional
  • The @Embedded Annotation
Chapter 6. Java Persistence Query Language
  • OO Query Languages
  • The FROM Clause and Directionality
  • The WHERE Clause
  • The SELECT Clause
  • Joins
  • Aggregates and Grouping
  • Ordering
Chapter 7. 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
Chapter 8. Message-Driven Beans
  • Asynchronous Messaging
  • The Java Message Service
  • Message-Driven Beans
  • Message Types
  • Injecting JMS Queues
  • JMS Configuration in GlassFish
Chapter 9. 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
Chapter 10. Exception Handling
  • Java Exceptions
  • Remote Exceptions
  • EJB Exception Handling
  • System Exceptions
  • Application Exceptions
  • Transaction Control
Chapter 11. Security
  • Authentication and Authorization
  • Declarative Authorization
  • Abstract Roles
  • Concrete Realms
  • Configuring User Realms in GlassFish
  • Programmatic Authorization
  • Run-As Identity
Chapter 12. 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
Chapter 13. Timers
  • The EJB Timer Service
  • The TimerService Interface
  • The Timer Interface
  • Timeout Methods
  • Timer Handles
  • Transactions and Timers
Appendix A. Learning Resources
Appendix B. Quick Reference: Java EE Annotations
Module 1. New Features in Java 5
Chapter 1. Ease-of-Use Features
  • Goals of Java 5
  • Simplified for Loop
  • Variable Parameter Lists
  • Formatted Output
  • Static Imports
Chapter 2. Enumerated Types
  • Native Enumerations
  • Ordinal and String Representations
  • Looping Over Enums
  • Stateful and Behavioral Enumerations
Chapter 3. Generics
  • Using Generics
  • Generics in the Collections API
  • Developing Generic Classes
  • Auto-Boxing
  • Convertability of Generics
  • Wildcards
  • Type Erasure
  • Generic Methods
  • What You Can't Do
  • Strong and Weak Suits
Chapter 4. Annotations
  • Annotations
  • Aspect-Oriented Programming
  • Native Annotations
  • The Java Annotations Model
  • What Can Be Annotated
  • Annotations vs. Descriptors
  • Java EE Annotation Examples
Chapter 5. Compatibility and Migration
  • Compatibility: Compiler and Runtime
  • Mixing 1.4 and 5 Classes
  • Compatibility with Generics: Type Erasure
  • Compatibility with Enumerations and Varargs
  • Migrating 1.4 Code to Java 5
  • Runtime Type Safety with "Checked" Collections
Module 2. New Features in Java 6
Chapter 1. Annotation Processors
  • Pluggable Annotation Processors
  • Processing in Rounds
  • Reading the Type Model
  • Validation
  • Generating Code
  • Reading Resources
  • Creating Source Files
Chapter 2. XML and Web Services APIs
  • The Java API for XML Binding
  • Binding vs. Parsing
  • Generating an Object Model
  • Working with JAXB Object Models
  • JAXB Contexts, Marshallers, and Unmarshallers
  • Interoperable Web Services
  • SOAP and WSDL
  • The Java API for XML Web Services
  • Generating Proxies from WSDL
  • Using Generated Proxies
  • The Role of JAXB
  • Building Client Applications

Course Prerequisites

​Plenty of experience with Java programming using the 1.4 SDK is essential Java Training Learning Objectives

  • After successfully completing this course, you will be able to:
  • Take advantage of ease-of-use features including the simplified for loop, auto-boxing, and varargs.
  • Use and develop enumerated types, including those with their own state and inherent behavior.
  • Use generics effectively when coding to the Collections API.
  • Develop one's own generic types.
  • Use Java annotations as defined by other APIs, and develop one's own.
  • Understand issues of compatibility and migration in mixed 1.4/5 environments.
  • Develop annotation processors according to the new standard API, and plug them into Java compilers and other tools.
  • Use built-in support for XML binding via JAXB.
  • Use built-in support for web-service clients via JAX-WS.
  • Java Training
Course Schedule
This course is not scheduled yet.