EJB 3 Tutorial
home Info sitemap


Do you want outsource your project? PHP or Java , JSF 2, Richfaces 4, MySql and other technologies. Just send mail to info@developer.am.

EJB 3 Tutorial




Chapter 1 Introduction to EJB 3
A general overview of the Java EE architecture including EJB container services, the JPA persistence engine, and initial installation of the GlassFish application server.

   The EJB 3 Architecture
   EJB Container Services
   The JPA Persistence Engine
   EJB 3 Compared with Earlier Versions
   Installing GlassFish

Chapter 2 Session Beans
Creation of a session bean and its client and examples of running it from the application client container. Exploring the program directory structure. Packaging and deploying a session bean. A look at the stateless and stateful session beans lifecycle.

   Stateless Session Beans
   Annotations
   Creating a Session Bean Client
   The Ant Build Script
   The Application Client Container
   Building the Application
   Stateless Session Beans LifeCycle
   Stateful Session Beans
   Stateful Session Beans LifeCycle
   Local Interfaces

Chapter 3 Entities
Exploring EJB 3 entities. How to package and deploy entities and map an entity to a database table. Metadata defaults and how to override them. Generating primary keys.

   EJB 3 Entities
   comparison-entity-beans
   Mapping an Entity to a Database Table
   Introducing the EntityManager
   Field-Based Annotations
   Generating Primary Keys
   Overriding Metadata Defaults

Chapter 4 Object/Relational Mapping
One-to-one, one-to-many and many-to-many associations. Default object/relational mapping values and how to override them. Object/relational inheritance mapping and additional annotations.

   Customer Entity
   Account Entity
   Address Entity
   Referee Entity
   Testing the Application
   Customer Entity Details
   Account Entity Details
   Address Entity
   BankServiceBean
   O/R Mapping Additional Annotations
   Composite Primary Keys
   SINGLE_TABLE Strategy
   JOINED Strategy
   Table per Concrete Class Strategy

Chapter 5 The Java Persistence Query Language
Looking at different groups of queries including aggregate functions, queries with relationships, subqueries, queries with parameters and named queries. JPQL joins and functions are also explained.

   Simple Queries
   Projection
   Conditional Expressions
   Aggregate Functions
   Queries with Relationships
   Collection Comparison Expressions
   Constructor Expressions
   SubQueries
   Functions
   Positional Parameters
   Named Parameters
   Named Queries
   Temporal annotation
   Queries with Date Parameters
   Datetime Functions
   Bulk Update and Delete
   Native SQL

Chapter 6 Entity Manager
Looks in detail at the entity manager. Covers both the EJB 3 container-managed and application-managed entity managers.

   Entity Manager Merge
   Entity Manager Methods
   Cascade Operations
   Extended Persistence Context
   Entity LifeCycle Callback Methods
   Entity Listeners

Chapter 7 Transactions
ACID properties and isolation levels. Container-managed transactions. Bean-managed transactions.

   Container-Managed Transaction Demarcation
   REQUIRED Example
   REQUIRES_NEW Example
   NOT_SUPPORTED Example
   SUPPORTS Example
   MANDATORY Example
   NEVER Example
   Controlling Container Managed Transactions
   SessionSynchronization Interface
   Doomed Transactions
   Isolation Levels
   Lost Update Problem
   Versioning
   Read and Write Locking
   UserTransaction Interface

Chapter 8 Messaging
Looks at the JMS (Java Messaging Service) API. Examples of queue producer and queue consumers. Topic producer and consumers. Message driven beans: their activation configuration properties, lifecycles and transactions.

   Java Message Service (JMS) API
   Queue Producer and Consumer Examples
   Synchronous Queue Consumer Example
   Synchronous Queue Consumer Examples
   An Asynchronous Queue Consumer Example
   Running the Asynchronous Queue Consumer Example
   Synchronous Topic Consumer Example
   Synchronous Topic Consumer and Producer
   An Asynchronous Topic Consumer Example
   Motivation for Message-Driven Beans
   A Simple Message-Driven Bean Example
   A Session Bean Queue Producer
   A Message-Driven Bean Queue Consumer
   acknowledgeMode
   subscriptionDurability
   messageSelector
   MessageDrivenContext
   MDB LifeCycle
   MDB Example Revisited
   Sending Message Confirmation to a Client
   MDBs and Transactions

Chapter 9 EJB Timer Service
Examples of single and interval events. Timer interface methods. Timers and transactions.

   Timer Service Examples
   A Single Event Example
   An Interval Event Example
   A Timer Interface Example
   Timers and Transactions

Chapter 10 Interceptors
Covers interceptor methods, classes and interceptor communication as well as default interceptors.

   Interceptor Methods
   Interceptor Classes
   Interceptor Communication

Chapter 11 Implementing EJB 3 Web Services
An overview of web service concepts and the web service definition language (WSDL). Creating and deploying a Java application as a web service. Creating and deploying an EJB session bean as a web service. Creating a web service client.

   The SOAP Protocol
   The WSDL Standard
   The UDDI Standard
   SOA and Web Services
   Creating a Java Application Web Service
   Creating an Endpoint Implementation Interface
   The WSDL Document
   Elements
   The GlassFish WSGEN Tool
   Deploying a Java Application as a Web Service
   The GlassFish Admin Console Test Harness
   Creating a Java Web Service Client
   Overriding JAX-WS Annotation Defaults
   Deploying an EJB Session Bean as a Web Service
   Creating an EJB Web Service Client

Chapter 12 EJB 3 Security
A look at security, GlassFish authentication, declarative and programmatic EJB authorization and Web Tier authentication and authorization.

   Java EE Container Security
   Authentication
   Mapping Roles to Groups
   Authenticating an EJB Application Client
   EJB Authorization
   Declarative Authorization
   Denying Authorization
   EJB Security Propagation
   Programmatic Authorization
   Java EE Web Container Security