[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] "declare precedence", are there best practices or ways to avoid problems
|
Hi all,
my Apache Magma Lab is composed of 115 aj files. As you can imagine,
precedence is an issue, and declare precedence is becoming a nightmare.
The biggest problem is that declare precedence is strict, if there is a
collision AspectJ refuses to weave, and I don't know a way to make it
"lenient".
For example, there are a couple of constructs ("declare precedence : Me
*" and "declare precedence: * Me") that are handy, and would be even
better it they could be interpreted with "PS: but it's not that important".
Since all these .aj files are organized in different projects, the
problem is even worse : the collision becomes apparent only when two
colliding aspect libraries are used; this creates a "logical" coupling
between two otherwise unrelated projects; since those two projects are
not coupled there is no way of declaring the precedence placing one
aspect in relation with the other.
A possible enhancement to AspectJ could be to provide a lenient way of
solving collisions, in situations where two aspects have the same
precedence and the developer doesn't give any explicit ordering, report
a warning and then apply the two aspects in any order, as it does when
no declare precedence is present.
In the mean time, are there any established best practices? Do you have
any ideas? Do you have any experience to share?
Simone
--
Simone Gianni CEO Semeru s.r.l. Apache Committer
http://www.simonegianni.it/