This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Spring AOP question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring AOP question" Watch "Spring AOP question" New topic
Author

Spring AOP question

Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
I am on the first chapter of Spring in Action and I am trying to learn the AOP part now. What I am trying to do is make marge speak after homer eats, but it is not doing that now. The contents of my simpsons.xml file is below, see any problems?



Both marge and homer inherit from a Simpsons abstract class which defines these two methods

[ December 22, 2007: Message edited by: Ra Carter ]
Aditya Jha
Ranch Hand

Joined: Aug 25, 2003
Posts: 227

Hi,

If you could tell us what kind of problem you're facing, may be we will be able to help you.

In particular, you may share if it produces a compile-time error, a run-time stack-trace, or if the advice is simply not getting executed at all without any apparent errors.

Just a suggestion - I usually define my pointcut(s) by using <aop: pointcut> element(s) directly inside <aop:config> element (In your example, the <aop: pointcut> element is inside the <aop:aspect> element). Later on, I declare <aop:aspect> elements inside the same <aop:config> element to define the aspects. This works well for me!

Regards,

- Aditya Jha
[ January 01, 2008: Message edited by: Aditya N Jha ]
 
Have you checked out Aspose?
 
subject: Spring AOP question
 
It's not a secret anymore!