This article is an excerpt from the ebook titled “Java Interceptor Development with ByteBuddy: Fundamental ”. The excerpt is the chapter two of the ebook.

Table of Content
Chapter 1: Introduction

This chapter explains on how to implement the on method enter advice. This chapter also explains on how to build and execute the instrumentation process. This process will be repeated in every chapters of this book. The source code for this chapter is included in ChapterVisitOnMethodEnterAdvice Eclipse project. This is the project structure:

There are three packages: interceptor, plugin, and program.

Interceptor package contains the advice code, LogInterceptor.java.

Plugin…


Article created on Nov 2019

This article demonstrates the use of Spring Eureka to implement service replication. Eureka Server provides service discovery that enables the service replication capability to the application architecture. With the use of service replication, when one server downs, another server with the same service can take over the down server to continue to serve the client request.

The application architecture must have two or more instances to enable service replication. These service servers must register themselves with the Eureka server. These service servers are the Eureka client.

The application architecture requires these components to create the…


This article is an excerpt from the ebook titled “Java Interceptor Development with ByteBuddy: Fundamental ”. The excerpt is the chapter one of the ebook.

Table of Content
Chapter 2: On Method Enter Advice

ByteBuddy is an open source Java based library for Java bytecode generation and manipulation. ByteBuddy is licensed under Apache License Version 2.0, and is freely available on Github. This book uses the term instrumentation to describe the bytecode generation, manipulation, and interception. This book provides example codes that applies ByteBuddy capability to intercept, add, modify and delete existing functionality of one or more Java classes by…


Article created on Dec 2019

This article demonstrates on how to implement circuit breaker using Resilience4J. Circuit Breaker is a design pattern used to provide client resiliency. Client resiliency protects client that uses a remote service from failure when there is an exception thrown from the remote service, and propagates to client side. Circuit breaker prevents client keeps invoke on failure service.

Resilience4J Circuit breaker provides resiliency by decorating the invoke source using functional programming style. Invoke source is one or more code statements that invoke the remote service. Circuit breaker pattern consists of three states: CLOSE, OPEN, and HALF-OPEN.

Eric

I am very interested in Java, web app and mobile app development. I enjoy doing R&D in Java during my spare time

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store