Home » Java (page 3)

Java

Thoughts on the Jakarta EE package name change

java-interview-questions-answers

The Eclipse Foundation announced that Jakarta EE cannot continue to use the javax package name. Apparently this comes with the fact that while Java EE bases on this name, no further modifications are allowed to classes or packages starting with that name. While this is certainly bad news, for me, the bad news already started when it was announced that ...

Read More »

The Kubernetes Spark operator in OpenShift Origin (Part 1)

This series is about the Kubernetes Spark operator by Radanalytics.io onOpenShift Origin. It is an Open Source operator to manageApache Spark clusters and applications.In order to deploy the operator on OpenShift Origin, the first time you need to clone the GitHub repository for it: git clone https://github.com/radanalyticsio/spark-operator.git Then login to the cluster using the OpenShift command-lineoc: oc login -u <username>:<password> ...

Read More »

Multiple Cache Configurations with Caffeine and Spring Boot

spring-interview-questions-answers

Caching is key for performance of nearly every application. Distributed caching is sometimes needed, but not always. In many cases a local cache would work just fine and there’s no need for the overhead and complexity of the distributed cache. So, in many applications, including plain Spring and Spring Boot, you can use @Cacheable on any method and its result ...

Read More »

Functional Hystrix using Spring Cloud HystrixCommands

spring-interview-questions-answers

Spring’s WebClient provides a non-blocking client for making service to service calls.Hystrix, though now in a maintenance mode, has been used for protecting service to service calls by preventing cascading failures, providing circuit breakers for calls to slow or faulty upstream services. In this post, I will be exploring how Spring Cloud provides a newer functional approach to wrapping a ...

Read More »

Top 9 Free Java Process Monitoring Tools & How to Choose One

So your Java code runs. Perhaps it even runs on a production server. After you pat yourself on the shoulder on a job well done, we’ve got good news and annoying news. The annoying news is that now, the debugging starts. Debugging and application performance monitoring that is. This means looking beyond the code written and into the internal workings ...

Read More »

Spring @Value Annotation

spring-interview-questions-answers

Introduction: Spring @Value annotation is used to inject values into variables and method arguments. We can either read spring environment variables or system variables. It also supports SpEL. In this quick tutorial, we’ll explore how to work with Spring @Value annotation. Setup: Let’s start by first defining a few properties in our app.properties file: user.first.name=Sam user.stocks=50 user.address=California user.preferences=A,B,C products.count={P1: '3', ...

Read More »

Java equals() and hashCode()

Introduction: Java Object class provides basic implementation of methods – hashCode() and equals(). These methods are extremely useful especially when working with the Collection framework. The hash table implementations rely on these methods for storing and retrieving data. In this tutorial, we’ll learn about the contract between hashCode() and equals(), their default implementations. We’ll also talk about when and how ...

Read More »

WeakHashMap In Java

A WeakHashMap in Java is a pretty popular data-structure among mid to senior-level Java developers. The WeakHashMap class is present in the java.util package. It’s a Map implementation which stores weak references to its keys. An entry in a WeakHashMap gets automatically removed when the associated key loses all of its active strong and soft references. In this post, we’ll first ...

Read More »