Questions tagged [pointcuts]
37 questions
2
votes
1 answer
AspectJ, general pointcuts without constructors
I've made a profiling method:
@Around("tld.mycompany.business.aspects.SystemArchitecture.inServiceLayer() && !tld.mycompany.business.aspects.SystemArchitecture.publicConstructor()")
public Object profileBusiness(ProceedingJoinPoint pjp) throws…

niklassaers
- 8,480
- 20
- 99
- 146
2
votes
1 answer
Join Points in Aspect Oriented Programming
I am currently studying about AOP and the important parts of it which are Advice, Pointcuts, and Join Points.
I read a very understandable explanation about what is Advice and Pointcuts from this links.
Aspect Oriented Programming vs.…

fuschia
- 283
- 2
- 6
- 23
1
vote
1 answer
Dynamic Pointcut expression.
Here's the thing, I've been working on a Monitoring solution with AOP, that can be extended to any kind of component. I'll try to break my concern in areas.
The idea:
Have a mechanism that allows dynamic pointcut expressions definition based on…

LdSe
- 334
- 1
- 3
- 17
1
vote
0 answers
How to log any inserts or updates in the database using Spring AOP annotations?
My application has a DAO layer which has methods like
@Override
public void save(final Role role) {
// save in database }
Now eevry time such save or update method is called I need to run an AOP aspect and log this in database.
I do not…

ajm
- 12,863
- 58
- 163
- 234
1
vote
2 answers
Pointcut not well Formatted
What is the format problem with this pointcut?
@Around("execution(* @myPackage.SafetyCritical.*(*))&& @annotation(deny)")
.i forgot to add: exception is "Pointcut is not well-formed: expecting 'name pattern' (last closing bracket before &&)
for an…

Acdc RocknRoll
- 677
- 5
- 9
- 16
1
vote
2 answers
Matching pointcuts with specific arguments
In Spring, I want an expression that matches a method with specific arguments.
Right now I have this expression
execution(* delete(..))
But I want to match specific arguments since there are 4 delete methods in the particular class I am…

user2434
- 6,339
- 18
- 63
- 87
1
vote
3 answers
AspectJ - Is it possible to catch execution of an advice?
I have a CachingAspect which performs some simple caching on properly annotated methods using an around advice. Now, what I want to do is to trace the caching and the around advice in particular.
So far I'm able to intercept method calls within the…

janhink
- 4,943
- 3
- 29
- 37
1
vote
1 answer
Can I amend the executed SQL before execution using an AspectJ pointcut
I'm trying to add a specific piece of SQL to all SQL executed in a system using AspectJ.
I've not used AspectJ before but I believe what I need to do is create a pointcut on
call(PreparedStatement Connection.prepareStatement(String))
and provide…

Joe T
- 141
- 2
- 12
1
vote
1 answer
AspectJ: Intercept return result of method inside another method
I need help to write some Aspectj advice on this particular case:
Suppose we have this class:
package org.group;
public class Person {
public void method1(String id, String number) {
//some code
List list =…

Tanorix
- 230
- 2
- 16
1
vote
0 answers
how to enable full featured aspectj in spring
How I can enable the full featured aspectj in a spring project to be able to use conditional pointcuts?
Right now I have in config file:

DanutClapa
- 592
- 2
- 7
- 23
1
vote
1 answer
Spring.Net public property setter pointcut
Do you know any pointcut definition in spring.net to intercept only public property setter (standard properties and auto-implement properties)?
Is there a way after this to remove some property by name (Id, Version...)?
Is it possible possible to…

Vince
- 1,036
- 1
- 10
- 17
1
vote
1 answer
Is there a way to improve this pointcut?
I have come up with the following pointcut that I use for tracing method entry/exit. It's not broken and also does what I want but: 1- I find it looks clumsy or could be more elegant; and 2- I don't know if it is bulletproof.
// tracing the…

kiwicptn
- 502
- 2
- 9
0
votes
1 answer
AspectJ Pointcut to introspect a local method code and print a variable inside local method
I am trying to write a pointcut and advice which could print a string from following method -
public CustomerDto getCustomer(Integer customerCode){
CustomerDto customerDto = new CustomerDto();
String…

user740500
- 3
- 2
0
votes
1 answer
Spring AOP-dynamic pointcuts
What is de purpose of CONTROLFLOWPOINTCUTS, for what purpose it is intended for, where and all it can be used?
What are the advantages of dynamic pointcuts??
Explain CONTROLFLOW POINTCUT with an example, where it is configured in XML file(decoupled…

aishu
- 1
- 1
0
votes
1 answer
My Aspect has two Pointcuts,But there's not work?
All right, I have a problem ,This is my logs Aspect. It's true that he has two Pointcuts .But every time I request the interface, I repeat 4 times.
spring boot version 1.5.10.RELEASE
github:https://github.com/spring-projects/spring-boot/issues/12570

Sober Li
- 1
- 3