Which is the simplest and least dependent AOP framework in Java?

I want to use an AOP framework, but I have two constraints.

Any framework that I choose

  1. Must be fairly independent. I plan to use this in a legacy code base, and hence cannot upgrade prospective dependencies like commons-logging-XXX.jar to commons-logging-newest.jar.

  2. Must be fairly well documented, should not be too complex to understand and integrate.

Asked by: Ada565 | Posted: 21-01-2022

Answer 1

AspectJ as far as I can tell is just a compiler and imposes no dependencies on compiled programs other than including the AspectJ runtime jar.

It is also actively maintained, part of the Eclipse project and has a nice development environment (AJDT, a plugin to Eclipse).

Answered by: Brooke293 | Posted: 22-02-2022

Answer 2

I like Spring + AspectJ. You can do all of your pointcut definitions in xml if you like, and you don't need to change a line of code on your legacy stuff. If you already know spring and AOP concepts, there's not much to learn.

Answered by: Marcus351 | Posted: 22-02-2022

Answer 3

Okay, this one doesn't fit all your requirements, but I think, it's worth a look: http://dynamicaspects.sourceforge.net/


  • No dependencies except needs java 1.5 due to using the JavaAgent
  • No XML markup needed and just works with POJO classes
  • Tried myself and found it very easy to use (not very complex)


  • No more activly maintained afaik
  • Poor documentation
  • You cannot do everything a full fledged AOP framework allows you to do

I tested it out some time ago and was pretty impressed but found some glitches which I don't remember right now. Though you might give it a try.

Greetz, GHad

Answered by: Maddie161 | Posted: 22-02-2022

Similar questions

java - Insert a dependent jar into an installer jar

I have a multi-module maven project with an installer sub-project. The installer will be distributed as an executable JAR. It will setup the DB and extract the WAR file to the app server. I would like to use maven to assemble this jar like so: /META-INF/MANIFEST.MF /com/example/installer/Installer.class /com/example/installer/... /server.war The manifest will h...

java - Maven and dependent modules

Colleagues have been touting the wonders of maven and its magical dependency stuff but I'm finding that it fails at what I would consider the obvious use. Suppose I have a root folder with a master POM. Then underneath I have some projects, call them A and B B requires A and so the POM in the B folder has the appropriate dependency entry in it Now, back in the root folder, in a profile, I sp...

java - Dependent columns in a JTable

Hie! I have a JTable. Columns of this JTable are rendered by JComboBox. I would like to be able to change items of column 2 on the basis of values selected in column 1. For example if the user selects Microsoft in column 1, then in column 2 he/she can select ado, wpf, etc. Is it possible ? If it is possible, than which events should be listened to do it ?

java - Should you provide dependent libraries in client jar?

We're providing a client jar for other internal apps to connect to our app's REST API. Our API depends on a few standard Jakarta libraries. Is it a best practice to include those JAR files within our client jar file? Or do you just document the dependencies and it's up to the clients to ensure they have those jars on their classpath?

java - How to index rows dependent on column values with Hibernate Search / Lucene?

Is it possible to use hibernate search/lucene to index some entity based on values of some fields? For example, let's take the following example: A product has several properties with values. e.g. property names could be color, amount, order-date, price, whatever... PRODUCT ( name description ... ) PROPERTY ( id name value fk_product ) And I only want t...

java - move all dependent libraries to a folder in netbeans

I have downloaded a few libraries for my netbeans solution to work. I want to store these in a seperate folder so when I save to GIT, I can checkout my project at home at not have to redownload all the libs it references. Can I do this if I already have my project up and running?

java - How to handle ordering of @Rule's when they are dependent on each other

I use embedded servers that run inside Junit test cases. Sometimes these servers require a working directory (for example the Apache Directory server). The new @Rule in Junit 4.7 can handle these cases. The TemporaryFolder-Rule can create a temporary directory. A custom ExternalResource-Rule can be created for server. But how do I handle if I want to pass the result from one rule into another: impor...

java - What is the standard way to bundle OSGi dependent libraries?

I have a project that references a number of open source libraries, some new, some not so new. That said, they are all stable and I wish to stick with my chosen versions until I have time to migrate to the newer versions (I tested hsqldb 2.0 yesterday and it contains many api changes). One of the libraries I have wish to embed is Jasper Reports, but as you all surely know, it comes with a mountain of supporting jar...

java - How to re-use a dependent project in ant?

We have a project that includes all of our re-usable classes, third-party library JARs and what not. This project is basically just where ALL of the dependencies for every project we are working on. We may only use ant and we may not use Ivy unfortunately. So for example: ./Common-Project (includes all dependencies -build.xml (will build this project, the dependencies, and package them all into 1 jar) ./...

class - Dependent Classes in Java

For our assignment we need to write code for a neural network. The way I planned to do it was to write a Node class, which is a node within the network; a Layer class, which is a layer of nodes and a NeuralNet class, which is a network of layers. I'm having a lot of trouble understanding the way Java is designed to work for imports. To me it seems that it should be a simple ma...

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)