[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[equinox-dev] Best way to register a WeavingHook?
- From: Stephan Herrmann <stephan.herrmann@xxxxxxxxx>
- Date: Thu, 25 Apr 2013 14:47:16 +0200
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
While playing with the new WeavingHook API , I wonder what's the
best way to ensure the service is registered ASAP during start-up.
Calling the service registry from my Activator obviously is
at the mercy of s.o. triggering the Activator to begin with.
Is the declarative way (MANIFEST.MF/Service-Component) safer?
What about the dependency on org.eclipse.equinox.ds?
No longer needing to provide a framework extension sounds like an
advantage of this approach, IFF (a) we get our stuff done without
any adaptor hooks and (b) registration happens early enough.
On a similar note: I observed RegistryFactory.getRegistry()
returning null when invoked from my activator. Is this expected?
After moving this call to the initialization of the service, null
did no longer occur, but I'm not sure if that's a safe fix??
So, my current experiments are about collecting some experience
with that new API. Moving forward I was wondering if we could:
- integrate individual weavers directly against the WeavingHook API
- implement the caching service against that same API
- optionally wire the weavers into the caching service instead of
direct wiring as WeavingHook.
But that would raise more questions how to do the service registration
Alternatively, if we keep the architecture of plugging the weaver
only indirectly (via a common weaving service) into the framework,
I need to better understand / remember, what is the added value of
I understand that the existing equinox.weaving.hook is primarily
responsible for hooking into the adaptor hooks, right?
In case we can avoid that road, what responsibilities would/
should remain in this bundle?