Questions tagged [aspectj]

AspectJ is an aspect-oriented extension to the Java programming language that enables clean modularization of crosscutting concerns such as logging, error handling, standards enforcement and feature variations. Use this tag for questions about the programmatic use of this extension. For downloads, support, IDE integration, & documentation, see the "learn more" for this tag.

AspectJ is an Aspect-Oriented Programming (AOP) extension to Java, created by Xerox, that has as main components aspects (consisting of pointcuts and advices) and join points.

For AspectJ Eclipse integration, also see AspectJ Development Tools (AJDT); for NetBeans integration, see AspectJ in NetBeans; for IntelliJ IDEA integration, see IDEA Web Help.

Books:

Documentation:

3304 questions
1
vote
1 answer

AspectJ Control Flow/Multiple Joinpoints

I am trying to learn AspectJ and figuring out how to retrieve specific joinpoints at certain points in a flow. My example is something like this: I want to run an unit test annotated with JUnit's @Test then any methods called in that test that may…
user1076802
  • 317
  • 1
  • 4
  • 15
1
vote
2 answers

Java: implicit type conversion, or implicit toString() invocation

In my Java application I created methods that return Either objects. This is because in some places I invoke these methods as the parameter of (3rd party) methods that expect a String parameter as input. While in other places I invoke…
rapt
  • 11,810
  • 35
  • 103
  • 145
1
vote
2 answers

Gradle and AspectJ - avoid weaving my own packages during compile time

I'm creating an aspectj project, which is NOT spring related. All the aspects were written by me. So Far I've been working with "ant" build to compile my agent, and now I'm trying to move to gradle. My problem - I don't want my classes to be…
Lin
  • 2,445
  • 5
  • 27
  • 37
1
vote
1 answer

aspectjweaver/javaagent in a sbt-assembly fatjar

I have a library that requires me to specify a javaagent using the aspectjweaver jar. eg. java -jar -javaagent:/some/location/aspectjweaver-1.8.2.jar myFatJar.jar This works fine. However, the environment that my fatjar will be running on does not…
Ren
  • 3,395
  • 2
  • 27
  • 46
1
vote
0 answers

Multiple Spring Transaction Management using aspectj

Have 2 Transaction Mangers as follows
Rehan
  • 929
  • 1
  • 12
  • 29
1
vote
0 answers

is transaction management applicalble without using @transactional over a method

Have the following configuration in a java project-
Rehan
  • 929
  • 1
  • 12
  • 29
1
vote
2 answers

autoweaving AspectJ fails during unit tests in IntelliJ

We have a series of unit tests and they were passing fine prior to me trying to add some aspects for dependency injection and logging duration of methods being called in our rest end points. In the unit tests prior to the tests failing, we get two…
jspriggs
  • 403
  • 1
  • 5
  • 15
1
vote
0 answers

To find which Transaction Manager gets loaded among multiple transaction managers when @transactional is called

Have some legacy code having transaction management defined in 2 configuration files as 1. 2.
Rehan
  • 929
  • 1
  • 12
  • 29
1
vote
1 answer

Spring Transaction Management using aspectj

Have 2 configuration files in a project. Both having Transaction management for different datasources using aspectj as follows- context1.xml