Announcement Announcement Module
No announcement yet.
AOP Proxy for Struts Action.execute(...) methods Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AOP Proxy for Struts Action.execute(...) methods

    I have to intercept execute(...) methods in Struts Action classes of an existing application which presently does not use Spring, for logging. I want to use Spring AOP for intercepting the execute(...) methods. Can someone help me with an example of AOP config ? Also, which AOP proxying mechanism should I use for intercepting methods in Struts Action classes?

    Any help would be highly appreciated.



  • #2
    I suggest you to perform static-time aspectj weaving against struts classes. There are numerous discussions regarding that here, e.g. this one - Spring configured - @Configurable - build time weaving


    • #3
      Thanks for your response. I had seen the link you have included in your response earlier. However, I have a problem taking that approach. I have a large and existing Struts application which does not use Spring. Now I want to write Spring AOP code for logging, by intercepting the execute methods of all the Struts Action classes without making any changes to the existing Struts Action classes. How can I do that ? Any help would be highly appreciated.


      • #4
        My approach doesn't assume any existing code modification. You just inject AOP logic to the existing classes during dedicated build-time stage.