Log4j2 Maven Configuration

This post is regarding logging (log4j2) configuration in a maven project. Here’s the steps to add lo4j2 in your maven project :- Maven Project Structure You need to have the above project structure .The log4j2.xml that is the logging configuration file ,needs to be placed under src/main/resources folder. Dependencies The following dependencies to be added […]

ORA-01882: timezone region not found error in Payara Server

This tutorial will explain how to resolve the “time zone region not found error ” when the user tries to set a JDBC Connection pool in payara server. We usually get this error when we try to create a JDBC Connection pool in payara server.You will get the following error when you try to ping […]

Callable Vs Runnable Interface

Both Callable and Runnable are interfaces used to define task supposed to be executed by a separate thread.Also, both of them can be used with lambda expressions. But there are key differences between the two interfaces. Callable interface can return the result of the task defined to be executed whereas Runnable does not return any […]

Java Executor Framework Tutorial

The concurrency API in Java was introduced in Java 1.5 .Java Executor framework is used to run the Runnable objects without creating new threads and reusing the existing ones as creating threads is an expensive process. It simplifies the execution of tasks in asynchronous mode. ExecutorService An ExecutorService is created using Executors factory methods. The […]

ThreadPoolExecutor and ScheduledThreadPoolExecutor

ThreadPoolExecutor ThreadPoolExecutor implements ExecutorService .It executes each submitted tasks using one of its internally pooled threads.Thread pools provide improved performance when executing large number of asynchronous tasks.This class provides many adjustable parameters and extensibility hooks. But usually ExecutorFactory methods are used to create thread pool. You can configure the no of threads in the ThreadPoolExecutor […]