One of the key properties for correct pessimistic locking handling and testing is LockTimeout.
Unfortunately its JPA support by different RDBMS providers is far from complete.
In this article I will show you how you may overcome this limitation on Oracle, MySQL, PostgreSQL, Apache Derby and H2.
Moreover, I will give you some suggestions about when pessimistic locking might be the correct solution and when not.
While optimistic locking handling in JPA is relatively well-known, it is usually poorly tested or not tested at all.
In this blog post I will show you firstly what does optimistic locking handling mean and how you could implement it within a Spring Boot Application and JPA.
After that you could see a way to write integration tests, which I hope could surprise you with their simplicity and efficiency!
Auditing can mean many different things;
sometimes it means saving every state change that occurs in your system on a remote server, and other times it means keeping a history of every state in your database.
Almost two years have passed since I wrote my first integration test for a Kafka Spring Boot application.
It took me a lot of research to write this first integration test and I eventually ended up to write a blog post on testing Kafka with Spring Boot.
There was not too much information out there about writing those tests and at the end it was really simple to do it, but undocumented.
I have seen a lot of feedback and interaction with my previous blog post and the GitHub Gist.
Since then spring-kafka-test changed two times the usage pattern and JUnit 5 has been introduces.
That means the…
In a previous blog post
I demonstrated how the vector datatype in Elasticsearch can be used to search words by their semantic meaning.
In this post I will show how a reverse image search for paintings can be implemented using the same methods.
Given a photo of a painting, we will use Elasticsearch to find other paintings which look similar.