aspose file tools*
The moose likes Other Application Frameworks and the fly likes Intercepting methods call in a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Intercepting methods call in a web application" Watch "Intercepting methods call in a web application" New topic
Author

Intercepting methods call in a web application

Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

Spring AOP is a subset of AspectJ, only the Spring AOP part requires Spring. AspectJ does not. So why not use AspectJ instead.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
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
Marshal

Joined: Mar 22, 2005
Posts: 41900
    
  63
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.


Ping & DNS - my free Android networking tools app
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Intercepting methods call in a web application