Learning Patterns Your Source for Quality Technology Courseware

Introduction to Spring 4 and JPA2

Spring is a lightweight Java framework for building enterprise applications. Its Core module allows you to manage the lifecycle of your objects and the dependencies between them via configuration metadata (either XML or annotations) and Dependency Injection / Inversion of Control. Its advanced capabilities provide support for JDBC and persistence frameworks like JPA2 (DAO and ORM modules), as well as integration with Java EE Web technologies.

The Java Persistence API (JPA) is is a Java standard object/relational (OR) persistence and query service for Java. JPA supports a POJO (Plain Old Java Object) based model using annotations which lets you develop persistent classes following common Java idioms. It supports entity relationships, inheritance, polymorphism, composition, and much more. .

The course is Spring 4 based, and a Spring 5 / Spring Boot based version is also available. This course includes coverage of all the core Spring 4 and JPA capabilities, as well as the integration capabilities provided by Spring. It provides extensive coverage of using Spring and JPA together, as well as all the core concepts of Spring and JPA themselves. All capabilities are practiced via an extensive set of hands-on labs.

The course starts with the basics of Spring and in-depth coverage of using the powerful capabilities of the Core module to reduce coupling and increase the flexibility and ease of maintenance and testing of your applications. It goes on to cover the basics of using Spring to simplify the creation of a persistence layer using its JPA integration capabilities.

The JPA material covers all basic JPA concepts, including mapping persistent classes, and using EntityManager and EntityManagerFactory to access and manipulate persistent entities. Querying with the Java Persistence Query Language (JPQL) is covered in depth, from basic queries to more advanced queries like eager queries using left joins. It also includes coverage of advanced concepts such as collections of value objects, relationships, and inheritance and polymorphic queries.

This course is hands on with labs to reinforce all the important concepts. It will enable you to build working Spring/JPA applications, and give you an understanding of the important concepts and technology in a very short time.

Course Objectives:

  • Understand the core principles of Spring, and of Dependency Injection (DI)/Inversion of Control
  • Use the Spring Core module and DI to configure and wire application objects (beans) together
  • Understand and use the complete capabilities of the Core module, such as lifecycle events, bean scopes, and the Spring API
  • Use Springs ORM/JPA capabilities to integrate Spring and JPA and create Spring/JPA-based DAO types
  • Understand and use Spring’s transaction support, including its easy to use tx/aop XML configuration elements and TX-based annotations
  • Integrate Spring with Java EE Web applications
  • Understand the benefits of JPA
  • Understand the JPA architecture
  • Create JPA based applications
  • Understand and use JPA mapping to map persistent objects to the database
  • Work with JPA queries and JPQL
  • Understand and work with collections and associations
    • Value and Entity Types
    • Bidrectional and unidirectional
    • 1-1, 1-N, N-N
  • Use JPA’s versioning support
  • Map inheritance hierarchies using JPA

Course Outline: