[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Best way to register a WeavingHook?

While playing with the new WeavingHook API [1], 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
that indirection.
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?


thanks, Stephan

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=406518