hi all,
as an exercise, i try to create a small Swing program relying upon
OSGi and, specifically, upon Felix and iPojo. In a few words, I try to
copy the features of Quicksilver/Launchy/Gnome DO.
So, for that, I have some services, implementing the UIStarter
interface, that have registered listeners, implementing the
HotKeyListener interface. To aggregate the whole, I also use a Control
service, which implements the HotKeyListener interface and tries to
get all the UIStarter services.
As a consequence, my Control service has the following code fragment

@Requires
private UIStarter[] starters;

@valdiate
public void initialize() {
}


What I planned tyo do was creating a WindowsUIStarter, using a
windows-specific java library (in my case, JIntelliType) to register
windows hotkeys, and other system-specific libraries for mac, linux,
and so on ...
Unfortunatly, JIntelliType fails to load (this is not the subject of
my question, but rather its trigger). As a consequence, my
WindowsUIStarter instance fails to validate. From my guesses, this, in
turns, prevents the Control#initialize method to be called, making all
of my code inactive.

Now, here comme my question : how is it possible, using pure
osgi/scr/ipojo, to define "optionnel" services, that's to say services
which non loading won't prevent my Control service to load. I
understand it is perfectly possible using pure OSGi and
ServcieListener interface (like in Felix tutorial
http://felix.apache.org/site/apache-felix-tutorial-example-1.html).
But, is there any way to do that in a more IoC-like fashion ?
Or, in an other fashion, prior to the call of @Validate, is my
starters array already filled with service (maybe invalid ones) ?

Thanks

-- 
Nicolas Delsaux

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to