Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
and many more ....
Email address:

Power Up Your Data Model With Projections


Introduction Data models can be tricky. Modelling can be even harder. Sometimes information that should go into a database table isn’t necessarily what we want to go out to every piece of code. And like so many other times, Spring comes to the rescue. A little feature called projection helps us to map data with only a few lines in ...

Read More »

20 Years Of Java

Twenty years ago in a Zurich apartment two momentous things happened. My daughter took her first steps and a young post doctoral researcher (her dad) took his first steps with Java.  It is really hard to fully understand what Java was back then.  These where the days in which TCL was all the rage and Java had some slightly strange ...

Read More »

Java 9 at a glance

To many Java 9 may seem to be a maintenance release that pushes forward project Jigsaw that couldn’t make it in Java 8. But along with the new module system in the JDK and a number of internal changes associated with it Java 9 brings also a number of cool new stuff to the developer’s toolbox. Here are the highlights: ...

Read More »

Run code on startup with Play and Scala

Depending on various projects, sometimes there is the need to execute some actions on initialization just before our application starts to serve requests. It was a common practice to call the functions that we wanted to get executed through GlobalSettings, however it is not recommended. The other way around to achieve this is to implement a class which will be ...

Read More »

Integration tests with Maven

Implementing unit tests with maven is something ordinary and most of us are familiar with the project structure and where the unit tests reside. However Integration tests are a different case and most of times they have pretty different requirements. For example it is ok to have your unit tests operate on a h2 in memory database but when it ...

Read More »

Transactional exception handling in CDI


In Java EE, exceptions that are raised during the execution of a transactional business method cause the transaction to rollback. However, this is only the case for system exceptions, that is, runtime exceptions, which are not declared in the method signature. For application exceptions, that is, checked exceptions, or any exception annotated with @ApplicationException, the transaction is not automatically rolled ...

Read More »

Write custom AssertJ assertions

AssertJ is an alternative matching library to the widely used Hamcrest matchers. For my own projects I in fact have changed to solely use AssertJ — I just find the fluid interfaces and extensibility quite appealing. You can write custom assertions as follows: Imagine a coffee with a strength and a drink type, such as Espresso or Latte. A custom CoffeeAssert validates ...

Read More »

Kotlin – Tuple type

It is very simple to write a Tuple type with the expressiveness of Kotlin. My objective expressed in tests is the following: 1. Be able to define a Tuple of up to 5 elements and be able to retrieve the elements using an index like placeholder, in a test expressed with 2 elements like this: val tup = Tuple("elem1", "elem2") assertThat(tup._1).isEqualTo("elem1") assertThat(tup._2).isEqualTo("elem2") ...

Read More »

Ethereum Hello World Example using solc and web3

I’ve been trying to find an Ethereum Hello World example and came across Thomas Conté’s excellent post that shows how to compile and deploy an Ethereum smart contract with solc and web3. In the latest version of web3 the API has changed to be based on promises so I decided to translate Thomas’ example. Let’s get started. Install npm libraries ...

Read More »