[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Equinox Aspects CachingService
- From: Heiko Seeberger <heiko@xxxxxxxxxxxxx>
- Date: Wed, 27 Jun 2007 21:24:45 +0200
- Delivered-to: email@example.com
- User-agent: Thunderbird 188.8.131.52 (Windows/20070604)
Thomas Watson schrieb:
> Hi Matthew, Martin and all other Equinox Aspects freaks,
> 1. I doubt that caching can be implemented using
> ClassLoadingStatsHook.recordClassDefine() like in AspectJHook.
> ClasspathManager.findClassImpl() calls recordClassDefine() with the
> orignial byte, not with the woven one. Therefore
> ICachingService.storeClass() will be passed the useless original
> weaving will not be cached.
> I suggest placing the caching calls into AspectJHook.processClass()
> after the weaving calls.
This has been fixed by
in 3.2.2. What version of Eclipse are you testing? The correct
woven bytes are now passed to recordClassDefine.
Thank you Tom!
I should have talked to Martin :-)
I am using 3.2.2 but I took org.eclipse.osgi_3.2.0 from the Equinox
Aspects CVS repository => I guess it should be deleted there!
That was nuber 1. But what about 2..4.?
2. I wonder if AspectJAdaptor.shouldWeave() ever returns false.
I checked with a modified implementation of AspectJHook (see 1.) where
my caching seemed to work but after loading the woven class (from cache)
sholdWeave() returned true.
Is this magic method surely working correctly? Could anone please
explain that "first four bytes logic" of shouldWeave() to me?
3. ICachingService.getInstance() and IWeavingService.getInstance() seem
strange design to me.
This is mixing of concerns. Once the caller (Activator of implementing
bundles) expects the implementations to be singleton factories, and once
Why not refactor getInstance() to ServiceFactories and let only these
ServiceFactories be OSGi services (singletons)?
4. The method ICachingService.hashNamespace() is never used externally,
thus can be removed from the interface. Right?