I used Spring a few years ago, loved it... moved to a project that didn't use it, and now I've come back.
I'm trying to implement an advisor using some of the new features in Spring 2.5, but I can't get it to work, I'm completely stumped; I've searched online, I've searched these forums, I've consulted books.
This is a recreation of my attempt with some very simple code, and I hope that someone can please point out to me what I'm doing wrong.
This is the behavior I'm seeing: the TargetImpl.execute() method executes (the sys.out prints to the screen), but there is no evidence that the interceptor is ever loaded, and it certainly doesn't execute (its sys.out is not seen anywhere, debugger never shows a reference to it in scope, never passes through the code).
First, the "program":
Now, the "target":
the "impl":
now, the advisor:
Finally, the Spring config, notice that I've attempted to define the pointcut and advice using two different methods (annotation and explicit configuation in config file, commented out), but neither worked.
Some log4j output, snipped a bit to avoid spam:
What I notice about this output is that there is no mention of aspects, advisors, pointcuts, joinpoints, etc, as I would expect from some of the other "problem" threads I've seen. This output was produced with trace as the logging level for all classes. Is there something else I need to do to somehow enable that logging?
Environment data:
Linux, Ubuntu 64-bit, v9.04
Java 1.6.0_12-b04, 64-bit
Spring 2.5.6.SEC01
Thanks for reading through the email, any advice (yes, a pun, I know
) is appreciated...