[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: after advice

2004-05-19 Thread kabkhan
Don't know if I have understod correctly, but your advice is responsible for 
propogating the call itself (i.e. invocation.invokeNext()). Stuff you do before the 
call to invocation.invokeNext() is done before the method is called, stuff after is 
doen after the method is called.

Apologies if I am just throwing spanners in the work!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835529#3835529

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835529


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: after advice

2004-05-19 Thread Bill Burke
Yes, Kabir is correct.  JBoss AOP has no before/after/after returning/after throws, 
etc...

These can all be handled implicitly with an around advice.

This was done on purpose to simplify the model.  There is no performance benefit of 
having before/after.  Also, IMO, it is more intuitive to have an around advice because 
it makes you more aware of the flow of the application and that you are part of the 
flow of an application.

So the solution is to have an advice:


  | public class MyAspect {
  | 
  | public Object myAdvice(Invocation invocation) throws Throwable {
  |  Object rtn = invocation.invokeNext();
  |   
  |   // DO AFTER STUFF HERE
  | 
  |   return rtn;
  | }
  | 
  | }
  | 

See?  Feedback?  Maybe I'm missing something.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835537#3835537

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835537


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development