Resources to learn AOP and AspectJ?

I'm currently reading Spring in Action after doing a spring Udemy course and personal project. I would like to learn more about AOP and AspectJ, however most books are written before 2010, and there aren't many tutorial online. Any ideas? I was looking at AspectJ in Action but it is 12 years old at this point...

πŸ‘︎ 16
πŸ’¬︎
πŸ“…︎ Apr 30 2021
🚨︎ report
Ruby and AspectJ

Hello I need help with ruby and aspectJ 90 minute quiz , PM for details :)

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/neoshero2
πŸ“…︎ Dec 12 2020
🚨︎ report
Configuring Spring Boot with AspectJ to make @Cacheable and @Transaction work on private methods geekyhacker.com/2020/03/2…
πŸ‘︎ 49
πŸ’¬︎
πŸ‘€︎ u/kasra_mp
πŸ“…︎ Mar 28 2020
🚨︎ report
Ruby and AspectJ

90 min coding exam , help needed and will be tested before hiring

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/neoshero2
πŸ“…︎ Dec 10 2020
🚨︎ report
My Java SE Technology Stack - My case for AspectJ

We already have amazing tools but, how do we use them properly? In this issue, we talk about cross-cutting concerns like logging and constraints validation and how we can modularize them rather than having them scattered throughout our code.

This is the sixth article in a series I've been posting on LinkedIn that describe the Java-based development stack I'm putting together in this quarantine.

by Gavin Fernandez

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/EPadronU
πŸ“…︎ May 18 2020
🚨︎ report
I want to like AspectJ

I have recently joined a new company and their tech stack is a little old. I have no issues at all with an old tech stack but I'm kinda hating on AspectJ. I've never used AspectJ before so my first introduction to it is that it was a pain to setup and it frequently breaks my build when I switch git branches.

Everyone here uses eclipse so until recently I've been using eclipse too. But I have now installed IntelliJ and have everything working. The AspectJ support in IntelliJ seems much better. For example, getting everything working in eclipse requires many manual and tedious steps specifically to get AspectJ working but with IntelliJ I didn't have to do anything at all. It's too early to tell if switching git branches will work better with IntelliJ but I'm hopeful.

So I'm disliking AspectJ a little less now and even thinking to myself, well, it's part of the tech stack so maybe I can learn to like it by using it for things.

Our stack looks like this:

  • Java
  • AspectJ
  • Spring MVC
  • Apache Velocity Templates
  • Some jquery for the UI.
  • JPA (hibernate)
  • Oracle over JDBC

At the moment it looks like AspectJ is being used for some kind of dependency injection but I'm not sure exactly what it's doing. The normal dependency injection is being handled by Spring in the usual way. When I ask my colleagues, most people can't give me a straight answer about what AspectJ is actually doing in our code base. (I do know that when it's not working it causes build errors or null pointer exceptions though!)

Anyway, it's a large and old enterprise web application that has had many people (mostly contractors) add features over the years so it's not the cleanest code-base ever. In particular there isn't much of a focus on unit testing here.

So, any suggestions on what AspectJ might do for me? In the short term I'm wondering if I can use it to help me understand the flow of execution. Like, can I use it to intercept method calls and dump values being passed and returned? Can I use it to help debug the velocity templates? The velocity templates here have lots of macros and are a bit of a black hole. Can it intercept and dump database interactions? Could I even cobble together some kind of time travel debugging?

Or can I add some config to AspectJ to help it log what it's doing? Maybe I'll dislike it less if I can see what it's doing.

By the way, I otherwise quite like this job and the team so "get another job" isn't a good choice on a cost-benefit analysis. Even thou

... keep reading on reddit ➑

πŸ‘︎ 9
πŸ’¬︎
πŸ“…︎ Jul 29 2019
🚨︎ report
AspectJ: How does Spring Configuration and Bean annotations work?

From AspectJ perspective, how would these two annotations work? A Configuration annotated class is not instantiated explicitly, therefore there is no valid join points to be executed, similarly method with Bean annotation is not executed, again explicitly. So, how does advises on these get executed?

πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/Cleathia
πŸ“…︎ Feb 08 2020
🚨︎ report
seamer, the refactoring tool for java now supports AspectJ

Seamer is a refactoring tool for Java, designed to help and get blackboxes under test to enable safe refactorings.

It will wrap your desired method, record all its invocations and results for later replaying in a test-harness.

It can be installed in many ways, but recently i added the possibility to use an annotation.

public class AspectJDemo {

    @Seam("name_of_your_seam")
    public String blackbox(String arg1, Integer arg2) {
        return arg1 + arg2;
    }
}

So you can for example use it in a Spring Framework application.

You just have to bootstrap AspectJ and the SeamerAspect

@RunWith(SpringRunner.class)
public class MissionStateEngineTest {

    @EnableAspectJAutoProxy
    @TestConfiguration
    static class TestConfig {

        @Bean
        public SeamerAspect seamerAspect() {
            return new SeamerAspect();
        }
     
        ...   
    }
    
    ...
}

practical example:
https://github.com/gregorriegler/seamer/blob/master/src/test/java/seamer/AspectJDemoTest.java

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/Naut1c
πŸ“…︎ Sep 01 2019
🚨︎ report
Auto loading android modules with AspectJ

I'm fairly certain i'm not the first in doing this, but i've seen a lot of people struggling to setup de-coupled module structures for different purposes. This project is just a basic example of how one could go ahead to get an almost completely decoupled project structure

Git url: https://github.com/Syrou/AutoLoader

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Syrou
πŸ“…︎ Feb 13 2016
🚨︎ report
Java Library that uses AspectJ - what would the client application have to do to use it?

So, I'm making a Java library to help with abstraction in application design. Or, rather, I'm seriously considering making this. It's an extension of some patterns I've been using in apps I've made, and I want to take it to a whole new level.

The idea is to use AspectJ to detect when certain things happen with the client application that uses my library. All aspects/pointcuts will be in my library, the client app won't (or doesn't have to, anyway) do anything with that.

I want my aspects to be able to weave with the client app's code (ie, code outside of the jar that they'll be in). I also want this whole thing to be super simple to be used in a client app.

So, to make this work, is it as simple as requiring that the AspectJ dependencies be in the classpath? Or is there more to it?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/Droid2Win
πŸ“…︎ Mar 13 2016
🚨︎ report
jcabi-aspects – Useful Java AOP/AspectJ Aspects aspects.jcabi.com/index.h…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/kreinba
πŸ“…︎ Nov 17 2014
🚨︎ report
ajc (AspectJ compiler) vs javac for AOP

I'm reading about Aspectj and trying to understand how compile-time weaving works.

My understanding is that ajc compiles and weaves AspectJ and Java source to produce bytecode for the JVM. I don't doubt the quality of ajc but are there any concerns for using ajc in lieu of javac? I would think that javac is more maintained and robust.

πŸ‘︎ 7
πŸ’¬︎
πŸ“…︎ Dec 29 2018
🚨︎ report
AppSec - Mitigating Clickjacking in Java with AOP & AspectJ bojansimic.com/mitigating…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/crunk-juice
πŸ“…︎ Jul 11 2012
🚨︎ report
Changing the name of JButton on main with only using AspectJ?

Hi there, people

I need to change the name of a Jbutton in main from "start" to "demo" using only an AspectJ extension. Any pointers would be greatly appreciated. I cannot seem to find any reference online on how to do this.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Lil_o_Jerms
πŸ“…︎ Apr 04 2017
🚨︎ report
Using AspectJ to log all methods parameters and return values during application runtime adevedo.com/content/using…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/adevedo
πŸ“…︎ Oct 07 2012
🚨︎ report
Collection of AOP/AspectJ Java Aspects github.com/jcabi/jcabi-as…
πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/edmoffo
πŸ“…︎ Nov 03 2014
🚨︎ report
Experienced aspect oriented programmers: How do you go about designing AOP software? [E.g. AspectJ]

In scientific publications on how to design AOP software the use cases are super simple (understandably, due to page limits). Also references to real world systems being built using those proposed techniques are in general lacking. So they're not very convincing most of the time.

Books on AOP tend to focus on how to program aspects, their philosophy etc, but not so much on design.

I was hoping people can explain how the design of these systems is done in actual business. I'm especially interested in AspectJ.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/BrutallySilent
πŸ“…︎ Dec 15 2013
🚨︎ report
AppSec how to: CSRF Mitigation with AspectJ and AOP. bojansimic.com/csrf-mitig…
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/crunk-juice
πŸ“…︎ Aug 13 2012
🚨︎ report
Need help using annotation based aspectj to log classes that are not Spring managed

I want to log the entrance and exit of every method in a project using aop, while using annotation based aspectj together with spring framework, the logging works fine for beans that are managed with Spring but doesnt work with other java classes or classes that implement no interface, thats about it.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/aycsharp
πŸ“…︎ Feb 04 2015
🚨︎ report
[Java] a student's AspectJ & Reflection project, need someone to point me in the right direction.

Hi everyone,

 

One of the requirements of a course I'm taking in college is making a small project on the subject of Object-Oriented-Design.

I had an idea to use java's AspectJ library & Reflections to create a simple applet that will let the user weave aspects into existing class/jar files (using GUI).

 

I scoured the internet for over a week just getting bombarded with too much information and having trouble making sense of it, so i would like to ask for some help.

 

a few questions:

  1. are there any simple ways to weave aspects into complied code?

i read a little about OSGI and Equinox and got overwhelmed.

  1. How would i dynamically load Class files into my app? how would i load entire JAR files with all the class files in it?

i tried using URLClassLoader, some class files gave me ClassNotFound exception and hours searching for a solution on the internet didn't help.

 

To get a sense of scale, the entire project is due in about a month, while I'm also studying.

in-case this wont work or too large of a scale to do in the time-frame mentioned,

my fallback plan is to simply read *.java source files as an input stream and let the user create aspectj files ( *.aj , used with AJDT)

 

would love to hear your thoughts,

Thanks.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Nexxado
πŸ“…︎ Dec 12 2015
🚨︎ report
Spring, AspectJ, Hazelcast Method Caching Aspect briandupreez.net/2010/09/…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/bdupreez
πŸ“…︎ Sep 21 2010
🚨︎ report
SERIOUS: This subreddit needs to understand what a "dad joke" really means.

I don't want to step on anybody's toes here, but the amount of non-dad jokes here in this subreddit really annoys me. First of all, dad jokes CAN be NSFW, it clearly says so in the sub rules. Secondly, it doesn't automatically make it a dad joke if it's from a conversation between you and your child. Most importantly, the jokes that your CHILDREN tell YOU are not dad jokes. The point of a dad joke is that it's so cheesy only a dad who's trying to be funny would make such a joke. That's it. They are stupid plays on words, lame puns and so on. There has to be a clever pun or wordplay for it to be considered a dad joke.

Again, to all the fellow dads, I apologise if I'm sounding too harsh. But I just needed to get it off my chest.

πŸ‘︎ 17k
πŸ’¬︎
πŸ‘€︎ u/anywhereiroa
πŸ“…︎ Jan 15 2022
🚨︎ report
Blind Girl Here. Give Me Your Best Blind Jokes!

Do your worst!

πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/Leckzsluthor
πŸ“…︎ Jan 02 2022
🚨︎ report
This subreddit is 10 years old now.

I'm surprised it hasn't decade.

πŸ‘︎ 14k
πŸ’¬︎
πŸ‘€︎ u/frexyincdude
πŸ“…︎ Jan 14 2022
🚨︎ report
Dropped my best ever dad joke & no one was around to hear it

For context I'm a Refuse Driver (Garbage man) & today I was on food waste. After I'd tipped I was checking the wagon for any defects when I spotted a lone pea balanced on the lifts.

I said "hey look, an escaPEA"

No one near me but it didn't half make me laugh for a good hour or so!

Edit: I can't believe how much this has blown up. Thank you everyone I've had a blast reading through the replies πŸ˜‚

πŸ‘︎ 19k
πŸ’¬︎
πŸ‘€︎ u/Vegetable-Acadia
πŸ“…︎ Jan 11 2022
🚨︎ report
What starts with a W and ends with a T

It really does, I swear!

πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/PsychedeIic_Sheep
πŸ“…︎ Jan 13 2022
🚨︎ report
What is a a bisexual person doing when they’re not dating anybody?

They’re on standbi

πŸ‘︎ 11k
πŸ’¬︎
πŸ‘€︎ u/Toby-the-Cactus
πŸ“…︎ Jan 12 2022
🚨︎ report
Geddit? No? Only me?
πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/shampy311
πŸ“…︎ Dec 28 2021
🚨︎ report
I wanna hear your best airplane puns.

Pilot on me!!

πŸ‘︎ 3k
πŸ’¬︎
πŸ‘€︎ u/Paulie_Felice
πŸ“…︎ Jan 07 2022
🚨︎ report
E or ß?
πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/Amazekam
πŸ“…︎ Jan 03 2022
🚨︎ report
Pun intended.
πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/Sharmaji1301
πŸ“…︎ Jan 15 2022
🚨︎ report
What did Spartacus say when the lion ate his wife?

Nothing, he was gladiator.

πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/rj104
πŸ“…︎ Jan 15 2022
🚨︎ report
No spoilers
πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/Onfour
πŸ“…︎ Jan 06 2022
🚨︎ report
Covid problems
πŸ‘︎ 7k
πŸ’¬︎
πŸ‘€︎ u/theincrediblebou
πŸ“…︎ Jan 12 2022
🚨︎ report
These aren't dad jokes...

Dad jokes are supposed to be jokes you can tell a kid and they will understand it and find it funny.

This sub is mostly just NSFW puns now.

If it needs a NSFW tag it's not a dad joke. There should just be a NSFW puns subreddit for that.

Edit* I'm not replying any longer and turning off notifications but to all those that say "no one cares", there sure are a lot of you arguing about it. Maybe I'm wrong but you people don't need to be rude about it. If you really don't care, don't comment.

πŸ‘︎ 12k
πŸ’¬︎
πŸ‘€︎ u/Lance986
πŸ“…︎ Dec 15 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.