Home About Courses Schedule Services Webinars Contact Search

Java Persistence with Spring

SEE SCHEDULE

Duration: 4 Days

Method: Instructor led, Hands-on workshops

Price: $2250.00

Course Code: SP1001



Audience

This is an introductory to intermediate level training course, designed for experienced Java developers and architects who need to implement database access using the Spring framework.

Description

Spring is a far-reaching framework that aims to facilitate all sorts of Java development, including every level of multi-tier distributed systems.

In this course, the experienced Java developer will learn to use the Spring application framework to manage objects in a lightweight "IoC" (inversion-of-control) container and to manage persistent objects using Spring's support for DAOs and transaction control. Here we focus on the Core and persistence modules, with a brief stop in the Web module to support hands-on exercises in Spring persistence for web applications.

Spring supports a wide range of persistence technology: ranging from raw JDBC to sophisticated object/relational mapping (ORM) tools such as Hibernate and TopLink, and also the new Java standard for those tools, the Java Persistence API. We work at either end of this spectrum, with exercises on improving JDBC code with Spring templates and transaction management, and also how to integrate JPA entities and DAOs into Spring applications and to deploy Spring transactions over JPA.

Objectives

Upon successful completion of this course, the student will be able to:

  • Understand the scope, purpose, and architecture of Spring
  • Use Spring's bean factories and application contexts to declare application components, rather than hard-coding their states and lifecycles
  • Use dependency injection to further control object relationships from outside the Java code base
  • Use annotations to take advantage of Spring post-processors for automated bean instantiation and wiring
  • Create validators for business objects, and associate them for application-level and unit-testing uses
  • Connect business objects to persistent stores using Spring's DAO and ORM modules
  • Simplify JDBC code using Spring templates
  • Integrate JPA entities and DAOs into Spring applications
  • Declare and enforce transaction requirements using Spring

Prerequisites

Experience in the following areas is required: Java programming & Basic knowledge of XML

Topics

  1. Introduction to Spring
    • Overview of Spring
      • Java EE: The Good, The Bad, and the Ugly
      • Enter the Framework
      • Spring Value Proposition
      • The Spring Container
      • Web Applications
      • Persistence Support
      • Aspect-Oriented Programming
      • The Java EE Module(s)
      • Integrating Other Frameworks
    • The Container
      • JavaBeans, Reconsidered
      • The Factory Pattern
      • Inversion of Control
      • XML View: Declaring Beans
      • Java View: Using Beans
      • Singletons and Prototypes
    • Instantiation and Configuration
      • Configuring Through Properties
      • Configuration Namespaces
      • The p: Notation
      • Bean (Configuration) Inheritance
      • Configuring Through Constructors
      • Bean Post-Processors
      • Lifecycle Hooks
      • Integrating Existing Factory Code
    • Dependency Injection
      • Complex Systems
      • Assembling Object Graphs
      • Dependency Injection
      • Single and Multiple Relationships
      • The Utility Schema
      • Bean Aliases
      • Inner Beans
      • Autowiring
      • Auto-Detecting Beans
      • @Autowired Properties
      • Best Practices with Spring 2.5 Annotations
    • Assembling Object Models
      • Collections and Maps
      • Support for Generics
      • The Spring Utility Schema (util:)
      • Autowiring to Multiple Beans
      • Order of Instantiation
      • Bean Factory vs. Application Context
    • Validation
      • Validators
      • The Errors Object
      • ValidationUtils
      • Error Messages and Localization
      • Nested Property Paths
  2. Web Applications
    • The Web Module
      • Spring in Flux
      • Servlets and JSPs: What's Missing
      • The MVC Pattern
      • The Front Controller Pattern
      • DispatcherServlet
      • A Request/Response Cycle
      • The Strategy Pattern
      • JavaBeans as Web Components
      • Web Application Contexts
      • Handler Mappings
      • "Creating" a Model
      • View Resolvers
  3. Persistence
    • Templates and DAOs
      • The DAO Pattern
      • The DaoSupport Hierarchy
      • The DataAccessException Hierarchy
      • JDBC DAOs
      • JdbcTemplate and RowMapper
    • Working with JPA
      • Object/Relational Mapping
      • The Java Persistence API
      • Blending Spring and JPA
      • Entity Manager Factories
      • Configuration Issues
    • Transactions
      • Transaction Managers
      • Transaction Advice
      • AOP vs. Annotations
      • JDBC Transaction Manager
      • JPA Transaction Manager