Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] LTW: multiple aspect weavers around

Hi!

While working on equinox aspects I am now facing the problem that I would like to allow multiple different weavers to work at load-time. This is not a big deal for me inside equinox aspects, I can even control the sequence of the weavers in an elegant way.

But generated classes are causing me some headaches: Assume I have the equinox AspectJ weaver working as well as my bridge for Spring to allow Spring load-time weaving (JPA, for example) at the same time. So I pass the class to be loaded to my equinox aspects AspectJ weaver and after that to Spring. Spring itself passes the class to some AspectJ weaver again. While this might not be a big deal in general, generated classes (closures for around stuff) are going to be defined twice by the weaver (resulting in a JVM classloader exception, something like duplicate class definition).

Do you have any idea how to solve this issue? In Equinox Aspects I thought about collecting all generated classes from all weavers and then define them once, but I am not able to get those generated classes back from the Spring load-time weaving infrastructures AspectJ weaver (to far away behind many layers of abstraction). Any idea?

Cheers,
-Martin



Back to the top