EJB 3 Development With JBoss - 35 Hour Online Class or 5 Day Classroom Workshop
An introduction to Enterprise Java Beans (EJB 3) for experienced to advanced Java programmers, focusing on real-world application of advanced concepts. Topics include an overview of Java Enterprise Edition (EE); introduction to the JBOSS Eclipse IDE platform (Perspectives, Views and Editor areas, Build & Validation, Templates & Code Completion, Import/Export, Searching, Setup Compiler Class Path and JRE Switching); EJB concepts including what they are, what their characteristics are and the need for EJBs for Distributed Computing, Transaction and Security; Stateless and Statefull Session Beans; Entities and Java Persistence API; Entity Relationships and Inheritance; Message-Driven Beans and an overview of Java Messaging Service (JMS); the EJB Timer Service; Transactions; EJB Security; Interceptors; Web Service Access to EJBs; EJB Deployment and more EJB Design Patterns.
Class Description:
This course is an introduction to the Enterprise Java Beans (EJB 3) technology. It starts by introducing the concepts and is ideal for someone who has never programmed using EJB. The course rapidly picks up and ends with advanced concepts that students can use in real life to complete large scale EJB based projects. The labs are done using Eclipse 3.0 and JBoss IDE 1.6. JBoss 4 application server is used as the server runtime.Major topics to be covered:
|
Objectives: After successfully completing this course, you will be able to:
Audience: This course is intended for intermediate to advanced Java programmers. System architects will find the advanced concepts especially beneficial in designing a framework.Prerequisites:Good Java programming knowledge. Be familiar with web application programming, including servlets and JSPs. |
Topic Summary
- Java Enterprise Edition (EE) Overview
- Introduction to Java Platform
- Java Community Process (JCP)
- Introduction to Java EE
- Why Move to Java EE
- Java EE - New and Enhanced Features
- Java EE Software Packaging
- Java EE Technologies
- Summary
- Introduction to JBoss Eclipse IDE
- The Eclipse Platform
- JBoss Eclipse IDE 1.6.0
- Views, Perspective and Editor Areas
- Basic Operations with JBoss Eclipse Views and Perspectives
- The Java Perspective
- The Debug Perspective
- Navigator View
- Package Explorer
- Outline View
- Problems View
- Tasks View
- Build and Validation
- Import and Export Project
- Templates and Code Completion
- Searching
- Setup Compiler Class Path
- JRE Switching
- Summary
- Enterprise JavaBeans (EJBs) Overview
- Need for EJBs
- Distributed Computing
- Distributed Transaction
- Distributed Security
- What are EJBs?
- Main Characteristics of EJBs
- EJB Remote Method Call
- EJB Architecture Components
- EJB Client
- EJB JAR File
- EJB Container
- EJB Server
- Enterprise JavaBeans
- Session Beans
- Entity Beans
- Java Persistence API - Entities
- Message-Driven Beans (MDBs)
- EJB Specification
- Summary
- Stateless Session Beans
- Session Beans
- Stateless Session Bean
- Stateless Session Bean Pooling
- Stateless Session Bean Examples
- Stateful Session Bean
- Stateful Session Bean Examples
- Annotations
- Stateless Session Bean Components
- Example: Business Interface
- Example: Bean Class
- Alternative Example
- Example: The Client
- Business Interface Details
- Bean Class Details
- JNDI - Overview
- Dependency Injection
- Dependency Annotations
- Injecting EJB References (@EJB)
- Injecting EJB References (@EJB) - Field Level Injection
- Injecting EJB References (@EJB) - Method Level Injection
- The @Resource Annotation
- Injecting Resources (@Resource) - Field Level Injection
- Injecting Resources (@Resource) - Method Level Injection
- A Full Example
- Session Bean Lifecycle
- Stateless Session Bean Lifecycle
- Summary
- Stateful Session Beans
- Stateful Session Bean
- Stateful Session Bean Examples
- Stateful Session Bean Components
- Stateful Session Bean Example
- Stateful Session Beans
- Session Bean Lifecycle
- Stateful Session Bean Lifecycle
- Summary
- Entities and Java Persistence API
- Data Persistence
- Java Persistence API
- Entities
- Session Beans Vs Entities
- Entities
- Persisting and Retrieving Data
- Entities - Example
- Descriptor File META-INF/persistence.xml
- Accessing Entities
- Persistence Context
- Working With the EntityManager Interface
- Accessing Entities Using Stateless Session Beans
- Updating Data
- Entity Lifecycle
- Life-Cycle Callbacks
- Example: Internal callback
- External Callback Class
- Listener Class - Example
- Synchronizing with Databases
- Entity Lookup
- EJBQL (EJB Query Language)
- EJB Query Language
- EJBQL: Simple examples
- EJBQL: SELECT clause
- EJBQL: SELECT clause
- EJBQL: FROM clause
- EJBQL: WHERE clause
- EJBQL: WHERE clause
- Using EJBQL - Dynamic Query
- Using EJBQL - Named Query
- Summary
- Entity Relationships and Inheritance
- Java Persistence API - Recap
- Entity Inheritance and Relationships
- Entity Inheritance - Introduction
- Mapped Superclass
- Entity Inheritance Mapping Strategies
- Scenario
- Single Table Per Class Hierarchy
- Separate Table Per Subclass
- Single Table Per Concrete Entity Class
- Relationships
- Types of Relationships
- One-to-One Example
- One-to-Many
- One-to-Many Example
- One-to-Many Bidirectional
- Many-to-Many
- Many-to-Many Example
- Summary
- Message-Driven Beans
- The Trouble with RMI/IIOP
- Messaging to the Rescue
- Messaging Features
- Message-Oriented Middleware
- Messaging Domains
- Publish/Subscribe
- Point-to-Point
- Java Message Service
- JMS Programming: Overview
- JMS Programming: Overview
- The JMS Interfaces
- Integrating JMS and EJB
- Message-Driven Beans Are Different From Other EJBs
- Message-Driven Beans Cannot Talk to Their Clients
- Message-Driven Beans are Stateless
- Durable Subscription
- Message-Driven Bean Interfaces
- javax.jms.MessageListener
- javax.jms.Message
- Specialized Message Types
- Lifecycle
- Message Driven Bean - Example
- Message Driven Bean - Client Example (JSP)
- Transactions
- Security
- Load Balancing
- Clustering and Topics
- Clustering and Queues
- A Few Tips
- Poison Messages
- How the Programmer Can Avoid Poison Messages
- How the System Administrator Can Avoid Poison Messages
- Building a Response
- Potential Problems
- A Simple Alternative
- Type Checking and Messages
- Testing Message-Driven Beans
- Summary
- References
- EJB Timer Service
- Container Managed Timer Service
- EJB Timer Service
- Interaction between Timer Service and EJB
- Timer Service API
- The TimerService Interface
- Obtaining the Timer Service
- Creating a Timer
- Getting All Timers
- The Timeout Callback method
- The Timer Interface
- Example: TimerTestBean
- Timer and Transaction
- Limitations of EJB Timer Service
- Summary
- Transactions
- 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
- Container Managed Transaction - Example
- Transaction Attributes Support
- Bean Managed Transaction
- Bean Managed Transaction - Example
- Client Managed Transaction
- Transaction Isolation
- Isolation Level
- Summary
- EJB Security
- Introduction
- How EJB Security Works
- Protecting Web Resources
- Setting Method Permission
- Defining Roles
- Specify Methods Permission
- Disable Security Check
- Excludes List
- Security Identity (Delegation Policy)
- Programmatic EJB Security
- Declaring Roles Using Annotations
- Declaring Roles Using Deployment Descriptor
- Summary
- Interceptors
- Introduction
- Interceptors
- Internal Interceptor
- Example: Internal Interceptor
- External Interceptors
- Default Interceptor - Example
- Class-Level Interceptor - Example
- Setting Class Level Interceptors
- Pre & Post Processing with Interceptors - Example
- Excluding Default and Class Level Interceptors
- Interceptors on Lifecycle Callbacks
- Summary
- Web Service Access to EJBs
- Web Service and EJBs
- Operation and Implementation
- WSDL
- Typical Development Workflow
- Advantages of Web Services
- Web Services and EJB
- Web Service Clients
- JAX-RPC Overview
- JAX-RPC Framework
- Java to XML Data Conversion
- Main Goals of JAX-RPC
- JAX-RPC Server
- WSDL Overview
- WSDL Document Tags
- Web Service EJBs
- Annotate The Session Bean
- Annotate the Methods
- Service Endpoint Interface
- Package and Deploy
- Summary
- EJB Deployment
- Packaging EJB JAR File
- The Bean Classes
- Dependent Classes
- Business Interfaces
- Client JAR File
- The Deployment Descriptor
- Basic Deployment Descriptor
- Configuring a Session EJB
- Configure Assembly Description
- JBoss EJB Deployment
- Specify JNDI Name of a EJB
- Specify Instance Pooling
- Configure Resources
- Deploying to JBoss
- Introduction to EJB Design Patterns
- Patterns Overview
- EJB Design Patterns
- EJB Design Pattern
- EJB Layer Patterns
- Session Faade Pattern
- Common Issues and Mistakes
- Message Faade Pattern
- Command Pattern
- Common Issues and Mistakes
- Summary
- More EJB Design Patterns
- Inter-Tier Data Transfer Patterns
- Data Transfer Object Pattern
- Custom Data Transfer Object Pattern
- Cached RowSet Pattern
- Common Mistakes and Issues
- Transaction and Persistence Patterns
- Version Number pattern
- Version Number Pattern
- Fast Lane Pattern
- Read for Update Pattern
- Summary

