Introducing about RAML

You all have probably worked with RESTful Web Service, but maybe not much have heard about RAML (RESTful API Modeling Language), a specification that helps us define API specs for the RESTful Web Service. In this tutorial, let’s learn about it, to know what it… Read More

Install Apache ActiveMQ

Apache ActiveMQ is a popular open-source JMS (Java Message Service) server. In this tutorial, I will guide you all on how to install Apache ActiveMQ. First of all, we need to download the latest version of Apache ActiveMQ at https://activemq.apache.org/components/classic/download/ We have the version for… Read More

Synchronized with Project Lombok

To avoid multiple threads using a method at the same time, we can declare the method using synchronized keyword of Java like below:

Project Lombok also provides a safer way to do this by using @Synchronized annotation.

With this annotation, Lombok will generate… Read More

Cleanup resource automatically with Project Lombok

When we use a resource like InputStream, OutputStream in Java, we should remember to close that resource after using. Before Java 7, we can close a resource in a finally block as below:

Since Java 7, we can use the try with resource to… Read More

Logging with Project Lombok

Normally, when we use a Logging framework like Log4J, Logback or Simple Logging Facade for Java (SLF4J) for these Logging frameworks in a class, we need declare for example as below:

But with Project Lombok, we don’t need to do that. When using Project… Read More

Builder Pattern with Project Lombok

Normally, when we need to create an object with a lot of its information, we can use the Builder Pattern for that purpose. For example, I have a Student class as below:

To build this object with all information using the Builder Pattern, we… Read More