Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Challenge


> Using a before advice won't do it as far as I can tell. The 
> only way to change the return value (say return null f.ex.), 
> or throw something like a ResourceUnavailable exception would 
> be in a around advice. Using a before advice won't stop the 
> actual call (or will it?).

  You can throw exceptions from before advice, and doing so naturally
stops the actual call from happening. 

  If you want to change the return value or not make the actual call
(e.g. get the value from cache), you have to use around advice.


 
      -Antti-




Back to the top