Results 1 to 2 of 2

Thread: before and after advice as opposed to around advice - any suggestions?

  1. #1
    Join Date
    Dec 2006
    Posts
    6

    Default before and after advice as opposed to around advice - any suggestions?

    Hi,
    My question is, will there be any performance benefit if we did a before and after advice instead of an around advice (provided we dont need to change the return param itself, and we are expecting the happy path (no exceptions etc))

    Thanks,
    Sasipriya

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    The general recommendation is to use the simplest advice that will get job done. The reason is clear semantics and simplified use (no worry about calling proceed()). However, performance is not a consideration in using one advice over other; in Spring AOP, internally everything works as around advice anyway.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •