• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Intercepting methods call in a web application

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Not sure if this is the right forum to post this question.

I have a complex web application which is build on a proprietary framework.
I am trying to understand the execution flow when a html form is submitted.

I tried to use eclipse debugger to understand the execution flow but was too complicated for such a big application(how many breakpoints shd i put?).

What I want is to log all the method calls to a log file. For ex: the log file should look like:

Entering/Executing Class1.method1
Entering/Executing Class2.method2
Exiting Class2.method2
Exiting Class1.method1

I know we can do this with Spring AOP but we are not using spring.
How to achieve this with out using spring?

Thanks in advance,
Srikanth.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring AOP is a subset of AspectJ, only the Spring AOP part requires Spring. AspectJ does not. So why not use AspectJ instead.

Mark
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:
Spring AOP is a subset of AspectJ, only the Spring AOP part requires Spring. AspectJ does not. So why not use AspectJ instead.

Mark



Thanks Mark. I am new to AspectJ. Could you please point me to a simple logging example for beginners with AspectJ. I tried to read some tutorials from google but couldn't follow them and felt those are for advanced users.

Thanks,
Srikanth.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the "AspectJ Language" section on the http://www.eclipse.org/aspectj/docs.php page. The Programming Guide includes a number of examples in the Getting Started and Examples section, amongst others.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Srikanth Reddy:


Thanks Mark. I am new to AspectJ. Could you please point me to a simple logging example for beginners with AspectJ. I tried to read some tutorials from google but couldn't follow them and felt those are for advanced users.

Thanks,
Srikanth.



Do you know Spring AOP? because it uses the same Expression Language as AspectJ

Mark
 
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic