Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Equinox Aspects and OSGi Weaving Hook Service Specification (56)

Hey Alexander!

It wasn't clear to me if you would like to "just" change the existing implementation to use the new hook or if you would like to implement a completely new aspect weaving mechanism.

So the existing structure of Equinox Weaving is:

- org.eclipse.equinox.weaving.hook
This uses the basic Equinox hooks to inject a general bytecode weaving and caching mechanism. There is nothing special here for aspect weaving. This hook provides a service interface that other bundles can implement to provide concrete bytecode modifications and a service hook for caching services.

- org.eclipse.equinox.weaving.aspectj
This implements the service interface from the hook mentioned above and uses the AspectJ weaver to weave aspects into bytecode.

- org.eclipse.equinox.weaving.caching
This implements the caching service from the hook mentioned above and implements an asynchronous cache storing on the hard drive.

My understanding of the OSGi Weaving specification is that it partly implements what the weaving hook mentioned above implemented (so that another bundle can implement a service interface in order to inject the real bytecode modification). So in an ideal world, the org.eclipse.equinox.weaving.aspectj bundle would use that interface in the future to realize bytecode weaving instead of the old one from o.e.e.weaving.hook. But doing this would also mean that the caching would no longer work for that weaving (because the old o.e.e.weaving.hook is the glue between weaving and caching).

The other way would be to re-implement the o.e.e.weaving.hook bundle to use the new OSGi Weaving spec hook instead of the old Equinox-specific ones while providing the same interface to the outside world as before (the one that the aspectj component uses). That would allow the caching to work with this. But from an design point of view, this wouldn't provide a big step forward, I think.

Just some thoughts...

Cheers,
-Martin




I thought that the only thing this reimplementation would affect would
be how (using osgi weaving hook vs equinox internal mechanisms) the
aspects are woven, and would not affect other things such as which
aspects to weave, caching etc. But given your question it seems I
thought wrong.. Could you please clarify? Also I'm not quite sure what
is opt-in and opt-out.. Is this about which side initiates the weaving
(Eclipse-SupplementBundle vs Require-Bundle)?

On Wed, May 11, 2011 at 10:49 AM, Martin Lippert<lippert@xxxxxxx>  wrote:
Hey Alexander!

Thanks for your answer, Martin.

I will indeed try to re-implement aspect weaving to comply to the
specification. If I succeed I'll send you my result so you could maybe
just review it and give it a go saving some of your development time..

Any contributions are of course highly welcome. Please let me know when you
have something working here. Would be glad to take a look.

The CVS resources are at the RT repository:

http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.equinox/weaving/bundles/?root=RT_Project

http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.equinox/weaving/features/?root=RT_Project

Hope that helps!

Are you planning on implementing just pure aspect weaving for AspectJ, or
are you also looking at the different aspect resolving mechanisms (opt-in
vs. opt-out) and the caching for woven classes?

Cheers,
-Martin





Therefore could you confirm that these are correct links for latest
source of Equinox Aspects (I got them from the same web site which as
you said is a little outdated):


http://dev.eclipse.org/viewcvs/viewvc.cgi/equinox-incubator/aspects/org.eclipse.equinox.weaving.hook/

http://dev.eclipse.org/viewcvs/viewvc.cgi/equinox-incubator/aspects/org.eclipse.equinox.weaving.aspectj/

http://dev.eclipse.org/viewcvs/viewvc.cgi/equinox-incubator/aspects/org.eclipse.equinox.weaving.caching/

http://dev.eclipse.org/viewcvs/viewvc.cgi/equinox-incubator/aspects/org.eclipse.equinox.weaving.caching.j9/

I was confused by 'equinox-incubator' part. You told me that the
project has graduated to the main SDK so maybe it now resides
somewhere else?

On Tue, May 10, 2011 at 8:28 PM, Martin Lippert<lippert@xxxxxxx>    wrote:

Hi Alexander!

Equinox Aspects is not the implementation of the OSGi Weaving Hook
Service
Specification. That specification is implemented as part of Equinox 3.7,
I
think. So if you use Equinox 3.7, you already have that specification
implementation at hand.

Equinox Aspects (now called Equinox Weaving) has graduated and ins now
part
of the Equinox SDK, so regularily updated by nightly builds, etc.
Nevertheless there isn't much activity in this area over the past month,
but
its pretty stable and usable.

The relationship between these two things are:
- Equinox Weaving was implemented before the weaving spec came out, to it
is
still based on some Equinox-specific hooks deep inside of Equinox and is
currently build mostly to weave aspects into OSGi bundles.
- The OSGi Weaving spec was done to allow all kinds of bytecode weaving
on a
general level, so you should be able to re-implement the aspect-weaving
part
of Equinox Weaving on top of the new OSGi spec right now. I haven't done
that (haven't found the time), but its on my list.

The web will be updated soon to reflect all this...

Hope this answers your questions!
-Martin





Could you please clarify for me whether the Equinox Aspects is the
implementation of OSGi Weaving Hook Service Specification? The thing
that confuses me is that Equinox Aspects was last update May 1 2009
(according to it's home page
http://www.eclipse.org/equinox/incubator/aspects/index.php) and is
still in incubator state with Milestone 7 as the latest version while
OSGi Weaving Hook Service Specification (56) was added to the
specification starting with version 4.3 which was released about a
month ago.

If the Equinox Aspects really is the implementation of this
specification then what is the current status of this project, what is
it's latest version and is it stable?

If the Equinox Aspects is NOT the implementation of the specification
mentioned then what are the differences between the two and what can
help me in choosing between them.

Thanks in advance...
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top