Integrating JSF, Hibernate and Spring 3.0

Course Objectives:

Students who attend Integrating JSF, Hibernate and Spring will leave the course armed with the required skills to design and implement web applications within Spring that effectively and transparently use Hibernate to manage data persistence and JSF to implement the view.  This course provides coverage of all the standard JSF components, renderers, converters, and validators, along with advice on how to use them to create solid applications.  Working in a hands-on, lab-intensive environment, students will explore and use complex user interface layouts, prototyping, and integrating templates with back-end model objects.

This course also provides coverage of Hibernate concepts and practices for interacting between Java and relational databases. The goal of this is to empower developers with the knowledge they need to design and implement Spring applications that effectively and transparently use Hibernate to manage data persistence.  The areas addressed in this course range from data/class mapping and persisted object lifecycle and management to how Hibernate can be used in the Spring framework.

Finally, this course provides a solid understanding of what Spring brings to the table and how to use Spring in the context of JSF and Hibernate.  Students are taken on an in-depth tour of the basic Spring framework, initially examining concepts such as Inversion of Control and Dependency Injection, and then working with the container and basic components.  The course then moves into the area of persistence, looking including Hibernate.  Students will then look at handling the view portion of a MVC web architecture using JSF from within Spring.

At the conclusion of this course, attendees will be able to:

  • Write web applications that take advantage of the FacesServlet, FacesContext and Action Java classes to control the user experience of the web application.Write JSF applications that gather and update information from external application servers such as EJBs, CORBA servers, and database servers.

  • Create and use custom Tag Libraries in JavaServer Pages.

  • Understand the use of the standard JSF Validators.

  • Understand the use of the standard JSF Data Conversion classes.

  • Take advantage of the JSF architecture that supports rendering output in several formats from the same application. Such as: HTML, WML, XML, etc.

  • Explain how the issues associated with object persistence in a relational model are addressed by Hibernate

  • Understand the relationships between Java, JSF, Spring, and Hibernate

  • Map Java classes to relational tables.

  • Capture both relational and inheritance associations in metadata using XML.

  • Create and use mappings between Java classes and relational databases.

  • Understand how identity and keys are handled in Hibernate.

  • Understand the persistent object lifecycle and how that relates to transactions and concurrency.

  • Explain the issues associated with complex frameworks such as JEE and how Spring addresses those issues

  • Write applications that take advantage of the Spring container and the declarative nature of assembling simple components into applications.

  • Understand how to use Hibernate and JSF within the Spring framework

Course Outline

Session:  Introduction to JSF
•JSF Goals
•JSF – Versions
•JSF 1.2 Features
•JSF – Vendor Support
•JSF – Related Technologies

Session:  Simple JSF Application
•Home Inventory Application
•Simple JSF Page
•Login Screen

Session:  Managed Beans
•JSFs Managed Bean Facility
•JSF Expression Language
•JSF EL - Basic Rules
•Unified Expression Language
•Managed Beans
•Declaring a Managed Bean
•Managed Bean Properties
•Managed Bean Scope

Session:  Navigation Rules

Session:  JSF Tag Libraries
•The h: tags
•JSF 1.2 additional attributes

Session:  The f: tags

Session:  Faces Context
•Faces Context
•JSF Lifecycle

Session:  Listeners
•ValueC angeListener


Session: Validators
•Built-in Validators
•Backing Bean Validators

Session:  Converters
•Built-in Converters
•Simple Custom Converters

Session: Hibernate Overview
•ORM Mapping Issues
•Hibernate Architecture
•Persistence, Identity, and Equality in Hibernate
•Domain Models and Metadata Options

Session: Hibernate QuickStart
•Basic Mapping
•Class/properties to Table/Columns
•Basic Configuration
•Mapping a POJO to a Database
•CRUD operations
•Basics of Hibernate Session
•Working with Persisted Objects

Session: Types in Hibernate
•Hibernate Type System
•Entity and Value Types
•Implementing Complex Types

Session: Associations in Hibernate
•Relational Associations
•Inheritance Associations
•Mapping Strategies
•Single, Class, and Concrete Tables

Session: Working with Persisted Objects
•Object states and lifecycles
•Hibernate Persistence Manager API

Session: Introduction to the Spring Framework
•Understanding the value of Spring
•Spring Overview
•Inversion of Control
•Dependency Injection (DI)
•DI and Testing
•Spring Application Architectures
•Spring Container
•Managing the Container
•Access to Services and Resources
•Application Contexts
•Beans as Components
•Beans and Factories
•XML Bean Configuration
•Bean Definition and Dependencies
•Bean Lifecycle
•Factory Beans
•Customization Options
•Property Editors

Session: Spring and Persistence
•Data Access Pattern
•Overview of Persistence Layer and Transactions
•Spring DAO
•DAO Implementations

•Transaction Overview
•Spring Transactions
•Isolation Levels
•Propagation Behaviors
•Defining Spring Transactions
•Declarative in Config Files
•Using Annotations and Config Files
•Working with Demarcation
•Managing Spring Transactions
•Spring and Hibernate
•Spring - Hibernate Architecture
•ORM Mapping Overview
•DAO Implementation
•Working with Hibernate DAOs in Spring
•Hibernate Template

Session: Spring and the Web
•Spring/Web Framework Architecture
•Spring and JSF
-Spring/JSF Architecture
-Integrating JSF into Spring


This an advanced level training course, designed for JEE developers that need to further extend their skills in web development. Attendees should have an extensive working knowledge of developing JEE applications.