09/12/2022 - 09/16/2022
10:00 AM - 06:00 PM
Online Virtual Class
USD $2,495.00
Enroll
10/17/2022 - 10/21/2022
10:00 AM - 06:00 PM
Online Virtual Class
USD $2,495.00
Enroll
11/07/2022 - 11/11/2022
10:00 AM - 06:00 PM
Online Virtual Class
USD $2,495.00
Enroll

Objectives

  Upon completion of this course, you should be able to:
  • Understand the need for the Spring framework
  • Program JSF web applications
  • Integrate Spring with JSF
  • Utilize JSF events, navigation, and validation
  • Use Java Persistence API (JPA) to manage persistence of Java data
  • Query persistent data with JPA QL
  • Manage relationships between data with JPA
  • Integrate Spring with the JPA ORM framework
  • Use Spring in web service applications
  • Utilize Spring JMS
 

Topics

 
  • Introduction to JSF
  • JSF components
  • JSF Navigation
  • JSF Validation
  • Using JSF with Spring
  • Introduction to JPA
  • JPA data queries
  • JPA entity relationships
  • JPA and Database Support in Spring
  • Spring Web Services
  • Spring JMS

Audience

 

Software designers, developers and programmers.

Prerequisites

 

To succeed fully in this course, students should be able to:

  • Program Java applications - Course WA1278 meets this requirement

Duration

  Five days.

 

Download Sample Labs Lab Setup Guide

Outline for Java EE Programming with Spring 3 Using Eclipse and WebSphere Training

Chapter 1. Introduction to the Spring Framework

  • What is the Spring Framework?
  • Spring Philosophies
  • Why Spring?
  • Spring Modules
  • Requirements and Supported Environments
  • Using Spring with Servers
  • Role of Spring Container
  • Spring Example
  • Avoiding Dependency on Spring
  • Additional Spring Projects/Frameworks
  • Summary

Chapter 2. Spring 3 Development Tools

  • SpringSource Tool Suite
  • Developing Spring 3 Applications With RAD
  • Sequence of Installation for Spring/RAD/WebSphere
  • Alternatives to RAD for Spring/WebSphere Development
  • Creating a Spring Project
  • Tools for Spring Beans Configuration Files
  • Spring Configuration Validation
  • Spring Web Flow Definition Tools
  • Maven Overview
  • Managing Spring JARs with Maven
  • Adding Maven Dependencies
  • Summary

Chapter 3. Defining and Using Spring Beans

  • Spring “Beans”
  • Spring Containers
  • Instantiating the Spring Container
  • Retrieving Spring Beans
  • Configuring Spring Beans
  • <bean> Element
  • Naming Beans
  • Setting Bean Properties
  • Using the Spring XML 'p' Schema
  • Creating Beans with a Constructor
  • Resolving Constructor Ambiguity
  • Setting Properties vs. Invoking Constructors
  • Bean Scope
  • Effect of Bean Scope on Instances
  • Summary

Chapter 4. Advanced Spring Bean Configuration

  • Defining Beans with Annotations
  • Component Stereotype Annotations
  • Spring Component Annotations
  • Bean Scope with Annotations
  • Configuring Classpath Scanning for Spring Beans
  • Choosing Which Annotations to Use
  • Overriding Annotation Configuration with XML
  • Externalizing Bean Configuration
  • PropertyPlaceholderConfigurer
  • PropertyOverrideConfigurer
  • Inheriting Bean Configuration
  • Lazy Initialization
  • Declaring Beans from Static Fields
  • Declaring Beans from Object Properties
  • Summary

Chapter 5. Spring Dependency Injection

  • Dependency Injection
  • Benefits of Dependency Injection
  • Specifying Bean References
  • Constructor Injection
  • Constructor vs. Setter Injection
  • Injecting Multivalued Properties
  • Other Multivalued Types
  • Specifying the Data Type of Collections
  • Defining Collections Using Utility Factory Beans
  • Defining a Reusable Properties From an External File
  • Bean Scope Effect on Dependency Injection
  • Autowiring With XML
  • Autowiring Example
  • Errors in Autowiring
  • Excluding a Bean from Autowiring
  • Autowiring Multivalued Properties
  • Mixing Explicit and Autowiring
  • Summary

Chapter 6. Spring Dependency Injection with Annotations

  • Dependency Injection Annotations
  • @Autowired and @Inject
  • Locations for @Autowired and @Inject
  • Autowiring Multivalued Properties
  • Autowiring by Bean Name with @Resource
  • Injecting Named Collections Defined in XML with @Resource
  • Checking Required Dependencies
  • Enforcing Required Properties with XML Autowiring
  • Multiple @Autowired Constructors
  • Multiple Autowiring Matches
  • Qualifiers with Annotation-based Autowiring
  • Adding a Qualifier Value to a Bean Definition
  • Qualification of Multivalued Properties
  • Defining Custom @Qualifier Annotations
  • Complex Custom @Qualifier Annotations
  • Associating Custom Bean Qualifiers with XML
  • Processing Injection Annotations
  • Overriding Annotation Injection
  • Summary

Chapter 7. Testing Spring Applications

  • Spring Unit Testing
  • Configuring Test Projects
  • Spring TestContext Framework
  • Implementing Test Classes
  • Loading Spring Configuration with Test Classes
  • Accessing Spring Components Within Test Classes
  • Defining Tests to Execute
  • Isolating Tests Which Modify the Spring Environment
  • Transactional Testing Support
  • Transactional Test Base Classes
  • Avoiding False Positives with ORM Testing
  • Other Transaction Annotations
  • Other Spring Annotations for JUnit
  • Unit Testing Support Classes
  • Mock Objects
  • Summary

Chapter 8. Introduction to JavaServer Faces 2.0

  • What is JavaServer Faces (JSF)?
  • Why Use JSF?
  • Nature of a JSF Application
  • JSF Implementations
  • JSF and MVC
  • Faces Servlet
  • Faces Servlet URL Mapping
  • Managed Bean
  • The View Layer
  • XML Validity of a Page
  • A Simple JSF Application
  • The Input Form: form.xhtml
  • The Result: thanks.xhtml
  • The Controller: AddressBean
  • How Does the Application Work?
  • Under the Covers: The Rendered Form HTML
  • Under the Covers: The Layout Tree
  • Additional References
  • Summary

Chapter 9. Basic Managed Bean and JSF Expression and Scope

  • Introduction
  • JSF Expression Language (EL)
  • Simple Value Property
  • Complex Value Property
  • Method Expression
  • Managed Bean Scopes
  • Implications of Various Scopes
  • View Scoped Managed Beans
  • Defining Managed Bean Scope
  • Getting Rid of the Session
  • Application Scope
  • "None" Scope
  • Custom Scopes
  • Summary

Chapter 10. Using JSF with Spring

  • JSF Integration Options
  • DelegatingVariableResolver
  • SpringBeanVariableResolver
  • SpringBeanFacesELResolver
  • Spring Bean Scopes
  • FacesContextUtils
  • JSF with Spring Web Flow

Chapter 11. Basic JSF User Interface Components

  • JSF UI Components
  • JSF UI Tags
  • A Basic Page
  • Define a Form
  • Labels and Images
  • Button
  • Links
  • Output Link
  • Text Input
  • Simple Check Box
  • Check Box Group
  • Check Box Group Example
  • Radio Button
  • List Boxes
  • Multiple Selection List Box
  • Dynamic List Box
  • Example
  • Component Identifier
  • Showing and Hiding Components
  • Other Common Attributes
  • Adding JavaScript and Stylesheet
  • Summary

Chapter 12. JSF Event Handling

  • Request Processing Phases
  • Action Request Processing Phases
  • JSF Event & Listener Model…
  • JSF Event Classes
  • Event Classes
  • Event Classes: Hierarchy
  • Action Event Handling
  • Action Event: Example
  • Action Listener
  • Passing Arguments
  • Value Change Event
  • Value Change Event Handler
  • Listener Classes
  • Listener Interfaces
  • Listener Classes: Hierarchy
  • Action Listener Class
  • Value Change Listener Class
  • Phase Event Listener
  • Request Processing Lifecycle
  • Phase Identifiers
  • Summary

Chapter 13. JSF Navigation

  • JSF Navigation
  • Example Action Event Handler
  • Implicit Navigation
  • Pros and Cons of Implicit Navigation
  • Defining Rules in faces-config.xml File
  • Stating the Source View ID
  • Stating the Action Handler Method
  • Global Rule
  • Doing Redirection
  • Implementing Redirection
  • Conditional Navigation
  • Preemptive Navigation
  • Summary

Chapter 14. Advanced JSF User Interface Components

  • HTML Panel
  • Applying Styles
  • Grouping Components
  • Data Table
  • Using a Data Table
  • Displaying a Header and Footer Row
  • Applying Styles
  • Adding Links to a Row
  • Handling Action
  • Summary

Chapter 15. Overview of Java Persistence API

  • Data Persistence
  • Java Persistence API
  • Entities
  • Session EJB vs JPA Entities
  • Entities
  • Persisting and Retrieving Data
  • Accessing Entities
  • EntityManager & Persistence Unit
  • Persistence Context
  • Entities - Example
  • persistence.xml – Hibernate Provider
  • persistence.xml – Open JPA Provider
  • persistence.xml - Toplink
  • Entity Instance Lifecycle
  • Creating EntityManager in Session EJB
  • Creating EntityManager in a Plain Java Class
  • Working With the EntityManager Interface
  • Transaction Basics
  • Summary

Chapter 16. Using Spring with JPA or Hibernate

  • Spring ORM
  • Benefits of Using Spring with ORM
  • Spring @Repository
  • Using JPA with Spring
  • Configure Spring JPA EntityManagerFactory
  • Using JNDI to Lookup JPA EntityManagerFactory
  • LocalContainerEntityManagerFactoryBean
  • LocalEntityManagerFactoryBean
  • Application JPA Code
  • Hibernate
  • Hibernate Session Factory
  • Spring LocalSessionFactoryBean
  • Application Hibernate Code
  • "Classic" Spring ORM Usage
  • Spring JpaTemplate
  • Spring JpaCallback
  • JpaTemplate Convenience Features
  • Spring HibernateTemplate
  • Spring HibernateCallback
  • HibernateTemplate Convenience Methods
  • Summary

Chapter 17. JPA Entity Lifecycle

  • Entity Lifecycle
  • When is an Entity Managed or Detached?
  • Implementing the CRUD Pattern
  • Accessing Entities Using Stateless Session Beans
  • Inserting Data
  • Retrieving Data
  • Updating Data
  • Deleting Data
  • Merging Entities
  • Merging Entities (example)
  • Life-Cycle Callbacks
  • Example: Internal callback
  • External Callback Class
  • Listener Class - Example
  • Synchronizing with Databases
  • Entity Lookup
  • JPAQL (JPA Query Language)
  • Summary

Chapter 18. Java Persistence Query Language (JPA QL)

  • JPA Query Language
  • Basic JPAQL Syntax
  • Simple SELECT Examples
  • Example of Using JPAQL
  • The SELECT clause
  • Reading Data from Code
  • The WHERE Clause
  • Example Using JPAQL from Session EJB
  • Named Query
  • Multiple Named Queries
  • TypedQuery
  • Bulk Updates
  • Bulk Delete
  • Running Native SQL Query
  • Native SELECT Query
  • Native SQL Delete and Insert
  • Named Native Query
  • Summary

Chapter 19. Basic JPA Entity Relationships

  • Relationship Between Entities
  • Anatomy of a Relationship
  • Foreign Key
  • Example Schema
  • One-to-One Unidirectional
  • Creating Entity Instances
  • Traversing the Relationship
  • The Cascade Behavior
  • One-to-One Bidirectional
  • Maintaining Bidirectional Links
  • Simplifying Bidirectional Links
  • Traversing the Relationship
  • Summary

Chapter 20. Complex Entity Relationships

  • One-To-Many and Many-To-One
  • Many-to-One Unidirectional
  • Creating Entity Instances
  • Traversing the Relationship
  • Modeling One-to-Many
  • Maintaining Bidirectional Links
  • Creating Entity Instances
  • Traversing the Relationship
  • Many-to-Many
  • Modeling Many-to-Many
  • Maintaining Bidirectional Links
  • Creating Entity Instances
  • Traversing Relationship
  • Modeling Unidirectional One-to-Many - @JoinTable
  • Modeling Unidirectional One-to-Many - @JoinColumn
  • Creating Entity Instances
  • Traversing the Relationship
  • Relationship in JPA QL
  • Fetching Optimizations
  • Lazy vs. Eager Initialization
  • Lazy Initialization
  • Various Problems with Lazy Initialization
  • Fetch Join Query
  • Summary

Chapter 21. Spring, JSF and JPA Integration

  • Integrating JSF
  • JPA
  • Spring
  • Putting It All Together
  • Simple Application
  • Code the JPA Entity
  • The Managed Bean
  • Entity as Managed Bean
  • Entity as a Field of the Managed Bean
  • Accessing the Entity Manager
  • EntityManager in JSF Managed Bean
  • Separate Spring Component Works with EntityManager
  • Entity As DTO
  • Managed Bean Scope
  • Summary

Chapter 22. Implementing Web Services with Spring

  • Web Services in Spring Applications
  • Spring Web Service Options
  • Injecting Spring Components Into Web Service Classes
  • Using Spring with JAX-WS Web Services
  • Extending the SpringBeanAutowiringSupport Class
  • Using a @PostConstruct Initialization Method
  • Combining @PostConstruct and @Autowired
  • Comparing Third Party Frameworks with Spring-WS
  • Summary

Chapter 23. Spring REST Services

  • Many Flavors of Services
  • Understanding REST
  • RESTful Services
  • REST Resource Examples
  • REST vs SOAP
  • REST Services With Spring MVC
  • Spring MVC @RequestMapping with REST
  • Working With the Request Body and Response Body
  • Implementing JAX-RS Services and Spring
  • JAX-RS Annotations
  • Java Clients Using RestTemplate
  • RestTemplate Methods
  • Summary

Chapter 24. Spring JMS

  • Spring JMS
  • JmsTemplate
  • Connection and Destination
  • JmsTemplate Configuration
  • Transaction Management
  • Example Transaction Configuration
  • Producer Example
  • Consumer Example
  • Converting Messages
  • Message Listener Containers
  • Message-Driven POJO's Async Receiver Example
  • Message-Driven POJO's Async Receiver Configuration
  • Summary

Chapter 25. Review of New Features in Spring 3.0

  • Requirements and Supported Environments
  • Using Spring with Servers
  • Packaging
  • Spring Expression Language
  • Java-based Configuration
  • Annotation-based Configuration
  • Spring MVC Changes
  • New Spring MVC Configuration
  • Spring MVC Annotation Example
  • Validation
  • Summary