This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Spring and the fly likes Difference between AOP and Interceptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Difference between AOP and Interceptor" Watch "Difference between AOP and Interceptor" New topic
Author

Difference between AOP and Interceptor

Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
If a project is designed using Spring and Struts2, can somebody tell when to use Interceptor in Struts2 and When to use AOP in Spring. This is always confusing us.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Use S2 interceptors when it's something related only to the normal S2 flow and/or need access to S2 infrastructure. Use AOP for everything else.
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
need access to S2 infrastructure


David could you please give me an example for this.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Something on the value stack, like the action.
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
Got the point. Thanks for your valuable time David
 
wood burning stoves
 
subject: Difference between AOP and Interceptor
 
Similar Threads
struts2 problem
How to Configure interface Preparable in Struts2..
AOP
struts2 + interceptor
Struts2 with Spring AOP