[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ajdt-dev] Problem with an around advice being run "sometimes"
|
Hi!
I have problem with an around advice being run "sometimes".
At first I suspected it to be AspectJ and posted this to the mailing list:
http://www.nabble.com/Pointcut-primitive-%22this%28Point%29%22-and-interfaces-tf1894816.html
Immedietly after the problem changed and I now suspect AJDT or the Maven
Eclipse Plugin.
I am using Eclipse 3.1.2 with AJDT 1.3.1 and m2eclipse 0.0.9.
I have a simple pointcut that should match methods that:
1. are in/under package se.example
2. has the annotation @Transactional
3. implements the interface MyInterface
pointcut TRANSACTIONAL(Transactional transactionalAnnotation):
execution(@Transactional * se.example..*(..))
&& @annotation(transactionalAnnotation);
&& this(MyInterface);
Object around(final Transactional transactional) throws StorageException
: TRANSACTIONAL(transactional)
{
// here I actually log using log4j "Entering around(Transactional = "
+ transactional + ");
MyInterface myInterface = (MyInterace)thisJoinPoint.getThis();
...
}
I have a class that implements MyInterface and that has a method annotated
with the Transactional annotation.
This method doesn't cause the around advice to run EVERY TIME when I use the
above pointcut. It seems to do well for a couple of runs then the around
advice isn't run and then suddently it works again.
Is there a problem with the AspectJ compilation within Eclipse?
Regards,
Jimisola
--
View this message in context: http://www.nabble.com/Problem-with-an-around-advice-being-run-%22sometimes%22-tf1895019.html#a5182541
Sent from the Eclipse Ajdt - Dev forum at Nabble.com.