File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Intercepting methods call in a web application

 
Saathvik Reddy
Ranch Hand
Posts: 228
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic