List/Grid Tag Archives: AspectJ

Getting rid of null parameters with a simple spring aspect
What is the most hated and at the same time the most popular exception in the world? I bet it’s the NullPointerException. NullPointerException can mean anything, from simple “ups, ...

Clean code with aspects
In my previous post I’ve described the alphabet conversion, and I’ve mentioned that we used AspectJ to resolve that task, but i did not mention how AspectJ works and what ...

Spring – Adding AOP support
I heard a story about one senior (and quite highly paid) softwaree engineer. He was given task to log every method in every controller in project he was working on. Engineer rewrote ...

A Simple Introduction to AOP
Why use AOP, a simple way to answer this question is to show an implementation of a cross cutting concern without using AOP. Consider a simple service and it’s implementation: ...

AOP made easy with AspectJ and Spring
I recently started looking at Aspect Oriented Programming (AOP) and I’m finding it exciting to say the least. Of course I was acquainted with it, since I saw it used for transaction ...

Implementing Active Record Pattern with Spring AOP
During class design we should take decisions about the assignment of responsibilities that will have every class. If we have chosen well, systems tend to be easier to understand, maintain ...

Spring Pitfalls: Proxying
Being a Spring framework user and enthusiast for many years I came across several misunderstandings and problems with this stack. Also there are places where abstractions leak terribly ...

Practical Introduction into Code Injection with AspectJ, Javassist, and Java Proxy
The ability to inject pieces of code into compiled classes and methods, either statically or at runtime, may be of immense help. This applies especially to troubleshooting problems ...

Domain Driven Design with Spring and AspectJ
In a previous post hosted at JavaCodeGeeks, our JCG partner Tomasz Nurkiewicz presented an introduction to Domain Driven Design using the State design pattern. At the end of that tutorial, ...

Aspect Oriented Programming with Spring AspectJ and Maven
Spring framework comes with AOP support. In fact, as stated in Spring reference documentation, “One of the key components of Spring is the AOP framework. While the Spring IoC container ...

