Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] OSGi, Contexts and DI

Am 26.10.2010 18:23, schrieb Oleg Besedin:
> What do you think? If dynamic injection of OSGi services required adding
> "null" checks (even for non-optional services), would that be acceptable?

You made some really good points. I was thinking DS-like. Optional means
that something is either there or not. As a consumer, I must be aware of
this. This awareness could be indicated by using an @Optional/@Nullable
(whatever) annotation.

In terms of multiple option, the Collection<MyService> approach seems
interesting. DS does support add/remove methods. I'm not sure what the
@Inject/DI approach for this is/should be.

-Gunnar

-- 
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/



Back to the top