Java Concurrency Tutorial – Locking: Intrinsic locks

1 Introduction In previous posts we reviewed some of the main risks of sharing data between different threads (like atomicity and visibility). Additionally, we learnt how to design classes in order to be shared safely (thread safe designs). In many situations though, we will need…

Java Concurrency Tutorial

This Java concurrency tutorial consists of several posts that explain the main concepts of concurrency in Java. It starts with the basics with posts about the main concerns or risks of using non synchronised programs. This tutorial consists on two main areas: Basic concepts about…

Java Concurrency Tutorial – Thread-safe designs

1 Introduction After reviewing what the main risks are when dealing with concurrent programs (like atomicity or visibility), we will go through some class designs that will help us prevent the aforementioned bugs. Some of these designs result in the construction of thread-safe concurrency solutions….

Java Concurrency Tutorial – Visibility between threads

1 Introduction When sharing an object’s state between different threads, other issues besides atomicity come into play. One of them is visibility between threads. The key fact is that without synchronization, instructions are not guaranteed to be executed in the order in which they appear…

Spring Integration 4.0: A complete XML-free example

1 Introduction Spring Integration 4.0 is finally here, and this release comes with very nice features. The one covered in this article is the possibility to configure an integration flow without using XML at all. Those people that don’t like XML will be able to…

Spring Integration – Configure web service client timeout

1 Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is handled by this gateway. Hence, you just need to worry about building the request message and handling the response. However,…

Thymeleaf integration with Spring (Part 2)

1 Introduction This is the second part of the Thymeleaf integration with Spring tutorial. You can read the first part here, where you will learn how to configure this project. As explained at the beginning of the first part of this tutorial, the web application…