avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: [RT] Merlin + AOP == Black Magic ?
Date Mon, 02 Aug 2004 02:43:41 GMT
On Monday 02 August 2004 05:33, Alexis Agahi wrote:
> On Sunday 01 August 2004 20:57, Niclas Hedhman wrote:
> > > Any suggestions?
> >
> > Yes, you are basically on the right track. Meta declarations should be
> > the way to go, and then some clever stuff going on in the runtime proxies
> > of the 'activation' package.
> Is there an API inside kernel allowing access to meta declaration data ?

Yes there is.

> Do you have any recommandation concerning the AOP lib to use?
> I was planning to user http://eclipse.org/aspectj/ as I've small/good
> experiance using it, but I'm not sure that the Common Public License
> http://eclipse.org/legal/cpl-v10.html can match ASL.

Hmmm? I didn't really have AspectJ in mind, possibly because I feel very 
uncomfortable with it. AspectJ could probably be used straight up, without 
any support from Merlin itself.

What I did have in mind was something like this;

public interface MethodInterceptor
    Object[] onMethodEntry( Object[] arguments );

    Object onMethodReturn( Object returnValue );

public class MyComponent
    implements MyInterface
     * @avalon.interceptor type="org.hedhman.niclas.MyInterceptor"
    public boolean myMethod( String value1, int value2 )

for explicit interception, and then back that with implicit interception which 
can be defined in the Merlin kernel setup.

Implicit Interception is mainly used for security related stuff, and where the 
component authors have no choice.

Explicit Interception is mainly used by component authors to handle certain 
things easier.

But then again, I have spent enough time thinking about these things.

  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 

To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message