Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] adding an aspect at runtime to an object

#: Luca Ferrari changed the world a bit at a time by saying on  9/26/2005 5:55 PM :#
Alexandru Popescu's cat, on 26/09/2005 12.06, walking on the keyboard wrote:
Afaik, you cannot 'add'/'merge' an aspect at runtime. Instead, what can be done is enabling/disabling an aspect.

That means I have a configuration file, like in JBoss AOP? Something that specifies to use or not a specific aspect bound to a specific object and its class? Or should I run the program within a special loader, like in aspectwerks?



I was talking more about in AspectWerkz concept about it: see more details here: http://aspectwerkz.codehaus.org/dynamic_aop.html.

AspectWerkz also supports a proxy solution. Jonas Boner has a very clear entry about it: http://blogs.codehaus.org/people/jboner/archives/000914_awproxy_proxy_on_steroids.html.

I cannot say for the moment which of these are/will be supported by AspectJ. You may find more information here: http://www.eclipse.org/aspectj/doc/next/adk15notebook/ltw.html

The above piece of code doesn't look to me as something of AJ. It rather looks like a proxy-based solution, but I may be wrong :-s.

What do you mean with proxy solution? Can you please explain it to me?


This is a larger discussion than I can handle here: usually AOP solutions went in 2 different directions: weaving and proxies (like in JDK1.3 Proxy class: a method that allows you to intercept calls to your methods: see some additional infos here: http://en.wikipedia.org/wiki/Proxy_pattern).

hth,

./alex
--
.the_mindstorm.

Thanks,
Luca



Back to the top