Advanced Java Training
Ajax Training: Ajax for Java Developers
Crafting Legacy Code (Available in .NET, Java, Javascript, or PHP)
Developing Applications with Adobe Flex
EJB Training: Introduction to Enterprise Java Beans
Groovy for Java Developers
Hibernate Training
Intermediate Java Training
Introduction to Dojo JavaScript Framework for AJAX
Introduction to Java Programming Training
Introduction to XML Training
Jakarta Struts Training
Java Development for Secure Systems
Java EE 5 (JEE - including EJB3)
Java Programming with Eclipse
JavaServer Faces (JSF) : Using JSF to Build J2EE Web Apps on the JBoss Application Server
JavaServer Faces Training: Introduction to JSF Training
JavaServer Pages Training: Introduction to JSP and Servlets Training
JBoss Training: Administering the JBoss 4.x Application Server
JBoss Training: Administering the JBoss 5.X Application Server
JBoss Training: Enterprise JavaBeans (EJB 3) on the JBoss Application Server
JBoss Training: Enterprise JavaBeans 3.0 (EJB3) and the Java Persistence API (JPA) on the JBoss Application Server
JBoss Training: Java EE with Servlets JSP & JDBC on JBoss AS
JBoss Training: Servlets/JSP on the JBoss Application Server
JBoss Training: SOA and Java Web Services (JAX-WS) on the JBoss Application Server
JQuery Training
Patterns In Frameworks Workshop
SOA and Java Web Services (JAX-WS)
Software Design Training: Effective Software Development Training Boot Camp
Spring Framework Training (Spring 3)
Test Driven Development (TDD) for Java
The JSP Standard Tag Library (JSTL)
Web Development Using Grails Training
Web Services Training: Developing Java Web Services
XML Programming Using Java
    

EJB Training: Introduction to Enterprise Java Beans

This course can be taught in WSAD, RAD, Eclipse, NetBeans, JBoss and other IDE's
  Course #:  NT162
  Duration:  3 days

EJB Training Overview

nTier's EJB training course offers the Java programmers a grounding in the Enterprise JavaBeans (EJB) architecture and the skills to develop simple EJB applications. EJB's position at the heart of the Java Enterprise platform and the use of EJB application servers as the backbone of large- scale distributed systems are studied. We consider the advantages of the application server architecture – transaction control, security, persistence, scalability through pooling and clustering – and study the development process for entity and session beans in depth. The J2EE 1.4 reference implementation is used for all demo and lab work, and we emphasize portable EJB 2.1 code. The focus for this course is on end-to-end connectivity.

The course follows a path roughly from the data layer to the presentation layer, so we look at entity beans first, and work demos and exercises in both Bean-Managed and Container-Managed Persistent Beans. Then the EJB session layer is considered, and both stateless and stateful session beans are developed. As part of the lab work, these are hooked to provided JSPs to illustrate the complete system and typical architecture.

NOTE: Our JSP and Servlets courses are excellent companions to this course, and in fact the primary lab track for this course is an extension of the JSP module's labs.

EJB Training Learning Objectives

  • Understand the role of Enterprise JavaBeans in enterprise-level systems development, and its relationship to other J2EE technologies such as JSP, servlets, JMS, CORBA, and XML.
  • Understand the EJB architecture: the role of the EJB container in mediating contact between the client and the bean, transaction control, authorization control, and the importance of object pooling.
  • Understand the development cycle for EJBs: Java source code and compilation,
    XML deployment descriptors, EJB compilation and deployment, and use by an
    application server.
  • Understand the role of entity beans, their lifecycle and interactions with the container.
  • Develop and test BMP and CMP entity beans and understand the importance of each of the entity-bean methods in assisting the container in pooling.
  • Understand the role of session beans, their lifecycle and interactions with the
    container.
  • Develop and test stateless and stateful session beans and effectively manage
    passivation/activation ycles.
  • Use the bean context interfaces to assist with persistence code and to correctly
    establish bean-to-bean communication.

EJB Training Prerequisites

  • Solid Java programming experience is a must. Our Java Programming course is good preparation for this module.
  • Some experience with distributed systems development, especially object-based systems such as Java RMI, CORBA, or COM is a plus.
  • Some knowledge of JDBC is helpful in understanding the EJB persistence model. Understanding of XML is a plus but is not needed.

EJB Training Outline

  1. The EJB Architecture
    • EJB and the Java Enterprise Platform
    • EJB and CORBA
    • EJB Costs and Benefits
    • What is an EJB?
    • Entity, Session, and Message-Driven Beans
    • EJB Roles
    • The EJB Container
    • The Home and EJB Objects
    • EJB Development
    • Remote Interface
    • Home Interface
    • Bean Class
    • Remote, Local, and Web-Service Component Interfaces
    • Multiple Maintenance Points
    • Using JNDI in EJB
  2. Entity Beans: Bean-Managed Persistence
    • Persistence Mechanism
    • Instance versus Incarnation – Similarities to the CORBA PSS
    • EntityBean Interface and Responsibilities
    • Entity Bean Interactions, Lifecycle and State Transitions
    • Primary Keys
    • EntityContext Interface and Discovering the Primary Key
    • Creation and Removal
    • Load and Store
    • Finder Methods
    • Eager vs. Lazy Persistence
  3. Entity Beans: Container-Managed Persistence
    • Two Contracts for Persistence
    • Declaring a Data Source
    • Declaring Persistent Fields
    • Implementing Finder Methods
    • What the Container Does
    • 1.1 Architecture
    • 2.0 Architecture
    • CMP Limitations
  4. Stateless Session Beans
    • Session Beans and the Presentation Layer
    • Stateful vs. Stateless Sessions
    • Stateful Session Bean Interactions, Lifecycle and State Transitions
    • Stateless Session Bean Interactions, Lifecycle and State Transitions
    • Finding Entity Beans
    • Passing Value Objects
  5. Stateful Session Beans
    • Stateful Session Beans
    • Object Pooling and Passivation/Activation
    • Activation and Passivation
    • Choosing Between Stateful and Stateless

Appendix A.  Learning Resources

System Requirements
Hardware – minimal: Pentium 500MHz, 128 meg RAM, 500 meg HD.
Hardware – recommended:   Pentium 1.5gHz, 512 meg RAM, 1 gig HD.
Operating system:

Tested on Windows XP Professional. The course software should be viable on all Windows or Linux systems which support J2EE 1.4.