Well, I suppose interceptors could be viewed as a simplified, specific implementation of AOP, but I would hardly equate the two. If I had to draw a venn diagram, I'd have AOP and commons-chain (CoR) as two big circles overlaping at a place called interceptors. With commons-chain, you could create a chain that has Filter commands with the last command being ExecuteAction. This way, you can have code to execute right before and right after the Action was executed, ala as an interceptor.

Don

Shey Rab Pawo wrote:
On Fri, 18 Feb 2005 21:02:44 -0500, Ted Husted <[EMAIL PROTECTED]> wrote:

On Fri, 18 Feb 2005 09:04:32 -0800, Don Brown wrote:

There is a middle ground which I have been playing with on and off
frequently called "interceptors".  In WebWork2, you can define
action interceptors that intercept certain actions, defined at a
per-action level.  With Struts Action Invocation Framework (SAIF)
at struts.sf.net/saif , we ported interceptors to pre-chain Struts,
but it would be interesting to integrate that work with Struts as
it is now.  It would be nice to define code that would be executed
only before certain groups of actions.

Why not add a Command to the request processing chain that acts as an interceptor.

The Command looks for the group of Actions, does it's business when they come 
along, and ignores the rest.

-Ted.



I may be mistaken on this, Don would be the expert of course on this,
but I think that the idea of the interceptors on SAIF is to provide
AOP support.  Command/Chain would seem to work against the basic
precepts of AOP, I think.  I admint that I am not 100% confident of
this statement.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to