Introduction

Java, with its rock-solid JVM, dominates the enterprise world. Spring is a major Java platform used within distributed systems. Understanding the Spring portfolio is essential for enterprise Java developers. The demand for Spring skills is skyrocketing.

This books covers all the major features that the Spring portfolio provides for enterprise development and prepares you for the Pivotal Certified Enterprise Integration Specialist with Spring exam. When you become Pivotal certified, you will have one of the most valuable credentials in Java.

The exam topics covered include tasks and scheduling, remoting, Spring Web Services framework, RESTful services with Spring MVC, Spring JMS module, JMS and JTA transactions with Spring, and batch processing with the Spring Batch and Spring Integration frameworks. This book covers them by explaining examples and focusing on major architectural considerations and concepts. The examples are the biggest contributor to the page count and are open sourced on GitHub (https://github.com/lkrnac/book-eiws-code-samples).

One of the important aspects of this book is its focus on new and modern abstractions provided by the Spring frameworks. Therefore, most of the features are shown with Java annotations (if they exist) alongside established XML configurations. Most of the examples are also based on the Spring Boot framework. Spring Boot adoption has been exponential because of its capability to significantly simplify Spring configuration according to sensible opinionated defaults. But Spring Boot is not the target of the exam, so all the features are also covered with plain Spring configuration examples.

What You’ll Learn

This book covers the following topics:

  • How to use Spring to create concurrent applications and schedule tasks
  • How to do remoting to implement client/server applications
  • How to work with Spring Web Services to create loosely coupled web services and clients
  • How to use Spring MVC to create RESTful web services and clients
  • How to integrate JMS for asynchronous messaging-based communication
  • How to use local JMS transactions with Spring
  • How to configure global JTA transactions with Spring
  • How to use Spring Integration to create event-driven pipes-and-filters architectures and integrate with external applications
  • How to use Spring Batch for managed, scalable batch processing that is based on both custom and built-in processing components

Who This Book Is For

This book is for developers and architects who have experience programming and developing with the Spring Framework. An understanding of Java is essential for this book, as well as knowledge of the dependency injection pattern and Spring features for the Inversion of Control container. All other features needed for the exam are covered from scratch, with a focus on providing an understanding to beginners as well as valuable material for intermediates and experts.

How This Book Is Structured

  • Chapter 1 explores Spring abstractions for asynchronous processing and compares them to plain Java support. It also covers Spring scheduling support.
  • Chapter 2 compares Spring RMI support with Java RMI APIs and explains the Spring HttpInvoker abstraction, as well as Hessian and Burlap protocol support provided by Spring.
  • Chapter 3 dives into the Spring Web Services framework and its features. It shows how Spring facilitates the Contract First style of SOAP web service development as well as client-side support.
  • Chapter 4 presents REST principles and the main HTTP features. It then highlights Spring MVC usage for REST services and compares it to JAX-RS APIs. This chapter also covers client-side support and Spring test support that’s useful for REST APIs.
  • Chapter 5 shows Java abstractions for the Java Message Service (JMS) and compares them to Spring abstractions. It covers both messaging paradigms (peer-to-peer and publish/subscribe) and explains how to read and send messages synchronously and how to listen asynchronously.
  • Chapter 6 covers JMS acknowledgment modes and transaction support. It subsequently dives into how to use them with the Spring JMS module.
  • Chapter 7 introduces JTA transactions and shows how to use them with Spring.
  • Chapter 8 takes a look at the Spring Integration framework and its message, message endpoint, and message channel types. It also focuses on topics such as interceptions, synchronous vs. asynchronous message passing, and error handling.
  • Chapter 9 discusses features of the Spring Batch framework, including its domain model, executing batch processing, passing parameters into Job, transitioning state, providing interception, and controlling batch flow. It also dives into the advanced topics of providing scaling and parallel processing.

Conventions

All the examples are written so that no artificial wrapping is needed. Italics is used for emphasis of particular aspects of the content. I believe that bullets make the options in the content much more readable and memorable, so they are often used to list the features discussed.

Prerequisites

Because we use Java, the operating system is not important. The examples in this book sometimes use Java 8 features, so you need to have Java 8 installed.

It is also important to have the Spring Tools Suite (STS) IDE (Spring’s flavor of Eclipse) available because Spring Integration and Spring Batch use its visualizations. It can be downloaded from the Spring site, http://spring.io/tools/sts/all. At the time of writing this book, the latest version was 3.7.1.RELEASE. You can use plain Eclipse with the Spring Tools Suite plug-in installed, but using the STS product is recommended.

All examples use the most common Java build tool, Maven, so you will need an Internet connection to build the examples. A separate Maven installation is not needed, as STS contains an embedded Maven installation out of the box.

You can use other popular Java IDEs such as IntelliJ IDEA or NetBeans, but you will lose the visualization features of STS for the Spring Integration and Spring Batch examples.

Throughout the content, we introduce various tools such as Lombok, PlantUML, ObjectAid, and the DHC REST/API client plug-in for Chrome. The use as well as the installation of these tools is explained as we use them. Because we use a Chrome plug-in, you need to have a Chrome browser available. But feel free to use any HTTP querying tool of choice instead of the DHC REST/API client plug-in; in that case, Chrome is not needed at all.

Downloading the Code

Code examples are hosted on GitHub: https://github.com/lkrnac/book-eiws-code-samples. Execute the command git clone https://github.com/lkrnac/book-eiws-code-samples from your command line.

Contacting the Author

I am eager to hear your feedback on this book. If you find any problems in the content or examples, please submit the issue on the GitHub repository for this book’s examples: https://github.com/lkrnac/book-eiws-code-samples. My personal web site, www.lkrnac.net/about, contains all the possible links for reaching me. The most effective way to contact me is to send e-mail to [email protected] or tweet to @luboskrnac.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.18.101