Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Spring AOP question

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 227
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic