Multithreading and Concurrent Programming

In the previous chapter, we learned how we can optimize Spring messaging. We also learned various configuration tips and tricks that help us to improve the performance of our application. We also looked at the monitoring and configuration of JMS and RabbitMQ for optimal performance.

In this chapter, we will cover the core concept of Java threads and then will move to advanced thread support provided by the java.util.concurrent package. For this package, we will see various classes and interfaces that help us write multithreaded and concurrent programming. We will also learn how we can use Java ThreadPool to improve performance. We will walk through useful functionalities provided by the Spring Framework, such as task executing, scheduling, and running as asynchronous. Finally, we will look into Spring transaction management with threads and various best programming practices for threads.

The following topics will be covered in this chapter:

  • Java classical threads
  • The java.util.concurrent package
  • Using the thread pools for asynchronous processing
  • Spring task execution and scheduling
  • Spring Async
  • Spring and threads—transactions
  • Java threads best programming practices
..................Content has been hidden....................

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