[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ conflicts

Thanks for the reply. I did go through that document and have a fair understanding of how the aspects are loaded.

My major concern here is, when I introduce a aop.xml (along other aop.xml present in the resource path) to the AspectJ load time weaver, what not should I do to modify the behavior of AspectJ that is essential for the application. 

I can come up with few:
1) Should not have aspects that should potentially exclude already defined application includes
2) Should not exclude packages that are needed bu that application by introducing explicit excludes in the aop.xml


---- On Fri, 03 Sep 2010 20:23:07 +0530 Andy Clement <andrew.clement@xxxxxxxxx> wrote ----

AspectJ merges all visible aop.xml files it can 'see' from a
particular classloader into one super-configuration. The rules that
apply are: (from

When several configuration files are visible from a given weaving
class loader their contents are conceptually merged. The files are
merged in the order they are found on the search path (with a regular
getResourceAsStream lookup) according to the following rules:

The set of available aspects is the set of all declared and defined
aspects (aspect and concrete-aspect elements of the aspects section).

- The set of aspects used for weaving is the subset of the available
aspects that are matched by at least one include statement and are not
matched by any exclude statements. If there are no include statements
then all non-excluded aspects are included.

- The set of types to be woven are those types matched by at least one
weaver include element and not matched by any weaver exclude element.
If there are no weaver include statements then all non-excluded types
are included.

- The weaver options are derived by taking the union of the options
specified in each of the weaver options attribute specifications.
Where an option takes a value e.g. -warn:none the most recently
defined value will be used

For the weaving itself you have the option of reweaving or the new
overweaving (see
http://www.eclipse.org/aspectj/doc/released/README-169.html ).


On 3 September 2010 03:28, Rajaraman Santhanam <ramanr@xxxxxxxxxxxx> wrote:
> Hi All,
> I'm planning to use AspectJ LTW in one of our product. I'm trying to
> implement Java Application Monitoring system using AspectJ. Just wondering
> what problems I'll run into if my agent is used in applications that already
> use AspectJ like Spring, JBoss, et al.
> I do understand, aop.xml are read in the order it appears in the resource
> path. Though my aspects are going to be different, my concern is weaver
> section's include & exclude
> Any advice here is appreciated.
> Regards,
> Rajaraman
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users