Skip to main content



      Home
Home » Eclipse Projects » Equinox » dependency injection hooks
dependency injection hooks [message #92920] Tue, 24 July 2007 16:49 Go to next message
Eclipse UserFriend
i'm searching for a way to inject dependencies into objects that are
created by the framework. e.g. implementations of IActionDelegate,
IViewPart, etc..
the idea is that all services that are used by an action, and of course
all services that are used by this service... are automatically injected
so that i don't have to wire the objects by hand and to avoid dependencies
to specific implementations of the service and thereby to simplify testing
(by mocking).

i would like to use google guice as injection framework.

if it would be possible to register an own version of
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI and use the
guice injector in the createExecutableExtension method to create the
instance (instead of classInstance.newInstance()), this would maybe do the
job.

i also looked at the org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook
and load an adapted proxy of RegistryStrategyOSGI but for my taste it is a
bit to close to the core =)

any idea where to plug-in?

cheers daniel
Re: dependency injection hooks [message #93390 is a reply to message #92920] Tue, 31 July 2007 13:57 Go to previous message
Eclipse UserFriend
You may want to take a look at the Spring-OSGi project. This project
uses the Spring framework to do dependency injection of spring
components in an OSGi environment.

Tom
Previous Topic:servlet linkage error when using servlet bridge
Next Topic:Binary compatible bundles
Goto Forum:
  


Current Time: Thu Jul 17 19:53:39 EDT 2025

Powered by FUDForum. Page generated in 0.04437 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top