[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Re: [NEWSDELIVER] Re: Scoping of weaved classes per aspect in aop.xml?
|
Barry,
You are correct; you cannot scope concrete
aspects _individually_ using aop.xml. The LTW configuration was not designed
to achieve this, merely to allow certain aspects or certain classes to
be excluded from weaving. What you are trying to do is probably not a good
idea as the definition of your cross-cutting, which should be modularized,
would be in two places: aspect, aop.xml. A better approach would
be to either refine the pointcut in your concrete aspect or leave it abstract
to allow different applications to tailor it (something we recommend in
large projects).
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/
To:
undisclosed-recipients:;
cc:
Subject:
[NEWSDELIVER]
Re: Scoping of weaved classes per aspect in aop.xml?
From: Matthew Webster
Barry,
Please take a look at the load-time weaving documentation: http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html.
You can achieve what you want with the "concrete-aspect" aop.xml
element. You just have to supply the abstract super-aspect.
---
Matthew, I poured over that doc already, but I don't see how I can achieve
this with the concrete-aspect. I'm trying to specify that "no aspects
should weave into package-X except aspect-Y". The "other"
aspects are already concrete will happily weave into package-X if its included
in the weaver section.
Maybe I'm just not seeing it? Do you know of an example that does this
with concrete-aspects?
I suppose I could segregate the aspect into its own jar with its own aop.xml...
but I'm looking for easier way.
thanks!
-barry