jQuery in Action, 2nd edition*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What is MethodInterceptor in aopalliance? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "What is MethodInterceptor in aopalliance?" Watch "What is MethodInterceptor in aopalliance?" New topic
Author

What is MethodInterceptor in aopalliance?

Jessica James
Ranch Hand

Joined: Jan 23, 2007
Posts: 69
hi,
I want to know what the MethodInterceptor in aopalliance is means?What is the purpose of it?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I've been using AOP under Spring, and I guess this is the same.
A MethodInterceptor is a kind of handler which will be triggered before/after a method is executed.
It may be useful to add some logging stuff before a third party lib's method is being called.
iBatis uses it to log SQL statements when the java.sql.* is being used.


[My Blog]
All roads lead to JavaRanch
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
oh oh..
satou...

very new terms

please tell me more !


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

http://static.springframework.org/spring/docs/2.0.x/reference/aop.html#aop-advice
Jessica James
Ranch Hand

Joined: Jan 23, 2007
Posts: 69
Thank you.... Am also using that for Logging the messages.
Can you please explain that with a simple Example(not with those proxy settings), explaining when the MethodInterceptor is invoked ahen a method is called, and how its log message is logged? of possipple, please give the part of the messages that are logged during the method invocation.
Jessica James
Ranch Hand

Joined: Jan 23, 2007
Posts: 69
Thank you.... Am also using that for Logging the messages.
Can you please explain that with a simple Example(not with those proxy settings), explaining when the MethodInterceptor is invoked ahen a method is called, and how its log message is logged? of possipple, please give the part of the messages that are logged during the method invocation.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is MethodInterceptor in aopalliance?
 
Similar Threads
Problem with setting the Pointcut and advice
java.lang.NoClassDefFoundError: MethodInterceptor
Spring and aopalliance
jboss-aop configuration help
Spring Flex test drive