|
Re: My Aspect is not run [message #65255 is a reply to message #65104] |
Wed, 24 May 2006 08:36 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Hi,
I think the "(runtime test)" bit is the key here. This is indicating
that the advice will only apply if a particular test passes at runtime.
This occurs when the pointcut used contains a designator like cflow
where the matches cannot be fully determined at compile time. In
addition to the "(runtime test)" text, the advice marker uses an icon
with a small question mark to indicate this - and shows all the
*potential* matches.
The advice is showing in the stack trace because the runtime test has
been woven into the class, but the test is not passing at runtime so the
advice is not reached.
Regards,
Matt.
Jimisola Laursen wrote:
> Hi!
>
> I believe that I have my pointcut and my only advice (TransactionAspect)
> setup correct - no errors or warnings.
> AJDT says "38 AspectJ markers at this line" on the line of my "around"
> advice.
>
> One method that this around advice should be applied to is Server.start.
> If I look on the method signature line AJDT says "advised by
> TransactionAspect.around(Transcational): TRANSACTIONAL.. (runtime test)".
>
> I've added several break points, both in the actual code of the around
> advice and in code in other classes that it calls, but none of the break
> points are hit (yes, I am running the application in debug mode). I also do
> debug outputs in the around advice both to stderr and to a logfile (using
> log4j) - no output what so ever.
>
> The odd thing is that when I hit a breakpoint in the method that the advice
> is suppose to be applied on - Server.start - then I see the following in the
> Debug Window:
>
> Thread[main] (Suspended (breakpoint at line 285 in Server)
> Server.start_aroundBody0(Server, Properties, JoinPoint) line: 285
> Server.start(Properties) line: 1
>
> Any idea on what my problem is. If you need the actual aspect to help me I
> gladly provide it.
>
> Regards,
> Jimisola
>
>
|
|
|
|
|
|
Re: My Aspect is not run [message #593854 is a reply to message #65104] |
Wed, 24 May 2006 08:36 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Hi,
I think the "(runtime test)" bit is the key here. This is indicating
that the advice will only apply if a particular test passes at runtime.
This occurs when the pointcut used contains a designator like cflow
where the matches cannot be fully determined at compile time. In
addition to the "(runtime test)" text, the advice marker uses an icon
with a small question mark to indicate this - and shows all the
*potential* matches.
The advice is showing in the stack trace because the runtime test has
been woven into the class, but the test is not passing at runtime so the
advice is not reached.
Regards,
Matt.
Jimisola Laursen wrote:
> Hi!
>
> I believe that I have my pointcut and my only advice (TransactionAspect)
> setup correct - no errors or warnings.
> AJDT says "38 AspectJ markers at this line" on the line of my "around"
> advice.
>
> One method that this around advice should be applied to is Server.start.
> If I look on the method signature line AJDT says "advised by
> TransactionAspect.around(Transcational): TRANSACTIONAL.. (runtime test)".
>
> I've added several break points, both in the actual code of the around
> advice and in code in other classes that it calls, but none of the break
> points are hit (yes, I am running the application in debug mode). I also do
> debug outputs in the around advice both to stderr and to a logfile (using
> log4j) - no output what so ever.
>
> The odd thing is that when I hit a breakpoint in the method that the advice
> is suppose to be applied on - Server.start - then I see the following in the
> Debug Window:
>
> Thread[main] (Suspended (breakpoint at line 285 in Server)
> Server.start_aroundBody0(Server, Properties, JoinPoint) line: 285
> Server.start(Properties) line: 1
>
> Any idea on what my problem is. If you need the actual aspect to help me I
> gladly provide it.
>
> Regards,
> Jimisola
>
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04120 seconds