Archive for the ‘java’ Category

Running your elasticsearch integration tests with JUnit 5, Karate and TestContainers (Docker)

Earlier this year I wrote an article on how to run your integration tests with an embedded elasticsearch. When upgrading to elasticsearch 7 this method didn’t work (yet). An alternative (and maybe even better) method is using Testcontainers to run elasticsearch in a Docker container. I will also show how you can leverage Karate to do your integration testing.

Read more…


How to remotely reload classes with Spring Developer Tools without opening extra ports

With Spring Developer Tools it is possible to reload classes on a local or remote machine from within your IDE without using JPDA. In this article I’ll show you how to do this and how to prevent this from happening on your production environment.

Read more…

Running your JUnit 5 integration test with an embedded elasticsearch on a random port (and optionally Spring Boot)

With recent versions of elasticsearch (5+) the learning curve for an integration test became a bit steeper but will result in a cleaner solution in the end. In this article I will describe how to set up your test with JUnit 5 to run your elasticsearch integration tests. I will also discuss how to make it work with Spring-Boot Test.

Read more…

Lessons learned after serving thousands of concurrent users in a devops team for a year

I just celebrated a year at a my customer. When I arrived the project was in a good shape with a few rough edges. There was a solid code review proces, a stable Jenkins server, motivated people, a reasonable amount of integration tests and a product owner who is very involved and very often in our vicinity. We serve thousands of users and our analist has the confidence to do a release at the busiest time of day.

Read more…

Categories: English, java, work Tags:

Introduction to Java heap tuning – Some easy steps to improve response times

At our current project we wanted to upgrade our EC2 instance to a newer family and generation to improve response times and make our application start faster. This simple task started with blindly increasing the heap size and ended with counting strings on the heap.

Read more…

Categories: English, java, work Tags: ,

When you tried high available logging and ended up with ‘mostly-available’ – How to setup Logback with GELF with TCP and HAProxy

Recently we ran into a problem where our logging disappeared sometimes. This happened after switching to an HAProxy load balancer. After many hours and some wireshark sessions we found an incorrect setting in HAProxy and apparently left out some important configuration in Logback. Idle connections were killed by HAProxy and we didn’t know there was a way to see that this happened.
This article may also be interesting when you run into disappearing or stale connections with HAProxy.

Read more…

Categories: English, java, work Tags: , , , , ,

Running java on Docker images on your Mac – A getting started guide

A few weeks ago I finally gave Docker a shot. It wasn’t a really smooth ride so I decided to write an article about it. I will run a Zookeeper as an example to get experience with Docker. After this description I’ll show you the obstacles I encountered and how to solve them. I will also provide some links to help you do some real life things with Docker.

Read more…

Categories: English, java, work Tags: , , ,