Browsing category Java

Scalable patterns in Spring

On-Demand Beans in Spring Boot: Scalable patterns in Spring


If you need to dynamically select or create a Spring bean at runtime, avoid calling ApplicationContext#getBean() inside business code. Instead, use one of these clean, scalable patterns: ✅ Map / EnumMap Injection (Strategy + Factory) – default and most idiomatic ✅ ServiceLocatorFactoryBean – proxy-based, zero-boilerplate lookup ✅ @Lookup Method Injection – fresh prototype per call

Is the Monolith Really the Devil?


Rethinking Monoliths, Modular Monoliths, and Microservices — Without the Hype For almost a decade, the industry has been shouting from rooftops: “Microservices or die!” If your architecture isn’t a constellation of dozens of services, event streams, service meshes, API gateways, sidecars, and autoscaling clusters, are you even doing real engineering? But here’s the uncomfortable truth:

Akka Actor Systems

Akka Actors – High concurrency Model for Scalable Java Applications


In modern Java-based systems, handling high concurrency efficiently is critical for scalable and responsive applications. Two of the most prominent concurrency models that have emerged are: Akka Actor Model Reactive/Event Loop Model In this blog post, we’ll explore Akka actors model in detail—how it work, how it differ from reactive model, when to use which,

Concurrent simplified using one line of code in Java ExecutorService and ThreadPoolExecutor


The Java ExecutorService interface, java.util.concurrent.ExecutorService, represents an asynchronous execution mechanism which is capable of executing tasks concurrently in the background.  In this post, We would discuss list of interfaces to run task in parallel in Java using Concurrency utilities. public interface Executor – An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of

Who decide your software architecture


Software architect should select proper architecture to develop an software system. For external stakeholders and customers, it is only functional requirement. There are many factors helps to decide the architecture for an application. Let us explore the factors decide the software architecture, Architectural drivers. Architecture requirements are not only functional requirements Architectural drivers are formally

Static code analysis

How to find weakness in your code – Static code analysis


Static program analysis(Static Code Analysis) is the analysis of computer software that is performed without actually executing programs — Wikipedia. This blog, we would discuss on Static Code Analysis. Static code analysis refers to the technique of approximating the runtime behavior of a program. In other words, it is the process of predicting the output

Checked exception and unchecked exception

Checked Exception and UnChecked Exception


Java provides framework to catch the exception and handle the exception by try…catch block. Java exceptions are grouped into two major categories checked exception and unchecked exception. Checked exception are caused by undesirable or unexpected condition. It can be recoverable by handling the issue in catch block such as one of the server port in

Throwable Error Exception in java jvm

Throwable and Error in Java


  In last discussion, we discussed on Exceptions and handling the exception. Now we would discuss one level up in the exception hierarchy Throwable and Error. Throwable class provides basic implementation for handling serious issue or recoverable issue in the code. All the Throwable and child of Throwable class objects can be thrown and handled

1 2 3 5