Enterprise Java Beans Developer Training

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.

The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity from the point of view of the developer. It leverages annotations (introduced in Java 5) and Object-Relational Mapping (ORM) technologies to eliminate the dependence on complex EJB APIs, allow POJO (Plain Old Java Object) based development, and provide an effective technology for creating distributed, transactional components, and for mapping relational data to an object schema. This course provides thorough coverage of the EJB3 technology - presented in a clear and effective manner. It starts with the basic concepts and APIs of EJB and then continues on with complex topics such as message driven beans and transactions. New concepts such as the use of annotations and the use of Dependency Injection to initialize references are covered in depth. The course also includes a solid introduction to developing persistent entities using the Java Persistence API (JPA). The course uses hands-on labs and a well-paced approach to make this complex technology understandable in an accelerated fashion. You will come away with a comprehensive understanding of EJB and the important issues that need to be considered to use it in real world applications.

Duration : 30 Hrs | 15 Days | 3 Weeks

Program Contents

Architecture Overview
  • What is EJB?
  • EJB Goals
  • Types of Enterprise JavaBeans
  • Java Persistence API
  • EJB and Java EE (Enterprise Editions)
  • EJB in Java EE Architecture
  • SOA and EJB
  • SOA with Web Services and EJB
  • EJB 3.0
  • EJB 3.0 Overview
  • EJB 2.X Problems
  • EJB 3.0 Goals
  • Enterprise Applications
  • Containers and Objects
  • Three Containers
  • Remote Connectivity
  • Scalability and Availability
  • Security
  • Transaction Control
  • Inversion of Control
  • The Bean-Type Annotations
  • Dependency Injection
  • The @EJB Annotation
  • The Administration Console
  • Deploying EJB Applications
  • Configuring Data Sources
  • Development Cycle and Roles
Session Bean Usage
  • Persistent Entity Usage
  • MDB Usage
  • Session Bean Overview
  • What are Session Beans?
  • Stateless Session Beans (SLSB)
  • Stateful Session Beans (SFSB)
  • Session Bean can be Distributed
  • Defining a Session Bean
  • Stateless Session Bean Definition
  • Calculator Remote Business Interface
  • Remote and Local Business Interface
  • Calculator Bean Local Business Interface
  • A Brief Note on Annotations
  • Interface/Implementation Split
  • Stateful vs. Stateless
  • The @Stateless Annotation
  • Lifecycle and State Transitions
  • Session Context
  • The @Stateful Annotation
  • State Transitions
  • Singletons and Pools
  • How Annotations Work
  • Annotation Definition
  • Using Annotations
  • What Else is Needed?
Packaging and Deployment
  • J2EE Packaging
  • EJB-JAR File
  • Deployment Descriptor (DD)
  • Deployment Descriptors in EJB 3
  • EJB-JAR File Structure
  • Enterprise Archive (EAR File)
  • application.xml File
  • Server Deployment
  • EJB Container
  • The EJB Container
  • Server Deployment
JNDI Overview
  • How do Remote Clients get EJB Access?
  • JNDI - Java Naming and Directory Interface
  • EJB Container Binds a Reference into JNDI
  • Client Looks up Reference in JNDI
  • JNDI Tree Structure
  • JNDI API
  • The Context Interface
  • The InitialContext Class
  • Specifying the InitialContext Properties
  • Using JNDI
  • EJB Client
  • Client View of a Session Bean
  • Client Invocation of a Session EJB
  • PortableRemoteObject and Casting
  • Running a Client
Dependency Injection
  • Dependency Injection
  • The JavaTunes Online Music Store
  • An EJB Referencing Another EJB
  • CatalogMaintenance
  • Injection of CatalogMaintenance
  • 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
  • What is Happening
Deployment Descriptors
  • More about Deployment Descriptors
  • The XML Deployment Descriptor
The EJB Environment
  • Issues with Obtaining Resources
  • Referencing Resources External to EAR
  • Reference and Deployment Descriptor Usage
  • Resolving a JNDI Name
  • Simple Environment Entries
  • Declaring Simple Environment Entries
  • Setter Injection
  • Resource Manager Connection Factories
  • More on the Enterprise Bean Environment
  • The Environment is a Level of Indirection
  • Looking up Resources in the Environment
  • Looking up via EJBContext
  • Looking up via JNDI API
  • More on the @Stateless Annotation
  • More on the @EJB Annotation
  • More on the @Resource Annotation
  • Deployment Descriptor vs Annotation
Stateless Session Bean Lifecycle and Interceptors
  • Stateless Session Bean State Diagram
  • Lifecycle of SSB
  • Client Call of a Stateless SB Method
  • Interceptors
  • Business Method Interceptors
  • InvocationContext Interface Details
  • Interceptor Method Details
  • Interceptor Class
  • Using Interceptor Classes
  • Method Level Interceptors
  • Lifecycle Callback Interceptors
  • Lifecycle Interceptor in the Bean Class
  • Lifecycle Interceptor in a Separate Class
  • Stateful Session Beans
  • Stateful Session Bean (SFSB) Overview
  • Coding a Stateful Session Bean
  • Stateful Session Bean Clients
  • Stateful Session Bean Removal
  • Stateful Session Passivation/Activation
  • When to Use Stateful Session Beans
  • @PrePassivate and @PostActivate Callbacks
  • Stateful Session Bean State Diagram
The Timer Service
  • The EJB Timer Service
  • The TimerService Interface
  • The Timer Interface
  • Timeout Methods
  • Timer Handles
  • Transactions and Timers
  • Bean Requirements
  • The javax.ejb.Timer Interface
  • The javax.ejb.TimerService Interface
  • How the Timer Works
  • Issues with Using the Timer Service
Overview of Messaging Systems
  • What is Messaging?
  • Loose Coupling
  • When is Messaging Used?
  • Two Messaging Models
  • Publish/Subscribe - Illustrated
  • More on Publish/Subscribe
  • Point-to-Point - Illustrated
  • More on Point-to-Point (P2P)
  • Message Delivery - Push versus Pull
Overview of JMS API
  • What is Java Message Service?
  • API Structure
  • JMS Interfaces
  • Administered Objects
  • Administered Objects and JNDI - Illustrated
  • Client Workflow
  • Synchronous Queue Consumer Client
  • Asynchronous Queue Consumer Client
  • JMS Message Types
  • Message Header Fields
Associations
  • Associations, Cardinality, and Ownership
  • Annotations
  • Unidirectional vs. Bidirectional
  • The @Embedded Annotation
Message-Driven Beans
  • J2EE Message Producers and Consumers
  • Message-Driven Bean (MDB) Overview
  • Goals of Message-Driven Beans
  • MDB Consumption of a Message
  • @MessageDriven Details
  • Activation Configuration Properties
  • Specifying a Destination for an MDB
  • Specifying a Destination Using a DD
  • Asynchronous Messaging
  • The Java Message Service
  • Message Types
  • Injecting JMS Queues
Message-Driven Bean Lifecycle
  • Lifecycle Overview
  • MDB State Diagram
  • Interceptor Methods
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
Transaction Definition
  • Transaction Overview
  • Transaction Lifecycle
  • Transactions Clarify Systems
Transactional System Overview
  • Transactional System Components
  • Transactional Object
  • EJB Transaction Support
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
Transactions in EJB
  • EJB Declarative Transaction Management
  • Transactional Scope
  • Specifying Transaction Attributes
  • NOTSUPPORTED
  • SUPPORTS
  • REQUIRED
  • REQUIRESNEW
  • MANDATORY
  • NEVER
  • Beans Have a Say in Transactions
  • Beans can be Notified of Transaction Status
  • Transaction Attributes – Some Choices
  • Explicit/Bean-Managed Transactions
  • Transaction Isolation Levels
  • Multi-Process TX and Two Phase Commit
Security in EJB
  • Authentication and Authorization
  • Declarative Authorization
  • Abstract Roles
  • Concrete Realms
  • Configuring User Realms in GlassFish
  • Programmatic Authorization
  • Run-As Identity
  • Security Requirements
  • J2EE Security
  • Roles
  • J2EE Security Overview
  • EJB Security Overview
  • Authentication
  • Programmatic Security
  • Transport Level Security with SSL
Exception Handling
  • Java Exceptions
  • Remote Exceptions
  • EJB Exception Handling
  • System Exceptions
  • Application Exceptions
  • Transaction Control
  • Exception Hierarchy
  • Application Exceptions in EJB
  • Defining Application Exceptions
  • Container Handling of Application Exception
  • Bean Throwing of Application Exception
  • Client Handling of Application Exceptions
  • System Exceptions Indicate Failure
  • Container Handling of System Exception
  • Client Handling of System Exceptions
EJB 3 Best Practices
  • When to Use EJB
  • Keep Business Interfaces Coarse Grained
  • Session Façade Structure
  • Use Container-Managed Transactions
  • Transaction Duration
  • Local and Remote Business Interface
  • Tuning
  • Session Bean Tuning
  • Clustering
  • Clustering Session Beans
JPA Overview
  • The Issues with Persistence Layers
  • Object-Relational Mapping (ORM) Issues
  • Issues with JDBC Alone
  • Java Persistence API Overview
  • JPA Benefits
  • Java Persistence Environments
Mapping a Simple Class
  • Entity Classes
  • Entity Class Requirements
  • The Entity Declaration
  • The Event Class
  • The Id Property
  • Filed Access or Property Access
  • The EVENTS Table
  • Generated Id Property
  • Mapping Properties
  • Basic Mapping Types
  • Persisting to the Database
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
Entity Manager and Persistence Context
  • The Entity Manager and Persistence Context
  • The EntityManager
  • The EntityManager Interface
  • Persistence Unit
  • Injecting an EntityManager
  • Retrieving Persistent Objects
  • Container-Managed Entity Manager
  • The Persistence Unit
  • persistence.xml
Inserting and Updating
  • Transient, Persistent, Detached Instances
  • Removed Instances
  • Persisting a New Entity
  • Synchronization to the Database
  • Updating a Persistent Instance
Querying and Java Persistence Query Language (JPQL)
  • Java Persistence Query Language
  • Executing a Query
  • Where Clause
  • Query Parameters
  • Using Query Parameters
  • Named Queries
  • OO Query Languages
  • The FROM Clause and Directionality
  • The WHERE Clause
  • The SELECT Clause
  • Joins
  • Aggregates and Grouping
  • Ordering
Mapping Relationships
  • Object Relationships
  • Mappings Overview
  • Unidirectional Many-To-One Relationship
  • The Table Structure - Many-To-One
  • The Owning Side
  • @JoinColumn
  • Bidirectional One-To-Many Relationship
  • Mapping the One-To-Many Relationship
  • Using the Relationship
  • More on the Inverse Side
  • Other Types of Relationships
  • Lazy and Eager Loading
  • Cascading Operations
  • Queries Across Relationships
Mapping Inheritance
  • Entity Inheritance
  • Details of Entity Inheritance
  • Joined (Table per Subclass)
  • Entity Definitions for Joined
  • Joined: Pros and Cons
  • Single Table Mapping Strategy
  • Table per Concrete Class
Versioning
  • Optimistic Locking / Detached Instances
  • Versioning
More on Querying
  • Projection Queries
  • Aggregate Queries
  • Bulk Update and Delete
  • Native SQL Queries
Embedded Objects
  • Using Embedded Objects
  • Embeddable Class
Java Persistence with Java SE
  • Using JPA with Java SE
  • Java SE APIs
Audience :
  • Java developers who want to use EJB3.
  • Developers who want to incorporate Java Business Components in their applications
Pre-requisites :
  • Solid Java programming skills and understanding of OO Java and Java-5 language features is essential.
  • Experience with developing Java web applications is very helpful for this course, but not strictly required.
  • Some knowledge of XML will be useful for writing the occasional deployment descriptor, but is not required.


Apply now at training@providenceconsulting.in

Next Steps

Find Talent Gaps

Find Talent Gaps Understand your
Java Talent
Risks within
60 minutes.
Contact us today
for a free
Talent Gap Assessment.

Certify Your Skills

Find Talent Gaps Providence's Certification
Program helps
you develop,
practice and test the
technology skills required
to dazzle in the IT arena.

Already Providence Trained ?

You can always take the
fast track to certification.

Stay in Touch

we are Social geeks