Thanks, Jerome. I saw reference to Habitat, but I couldn't find much
Javadoc on it or any examples I could use as a template. Is there a
working example you can point me to?
David
Jerome Dochez wrote:
> David Van Couvering wrote:
>> I sent this to the HK2 user list but it seems kind of quiet over
>> there, so I'm resending here:
>>
>> Hi, all. I would like to get all instances that implement a given
>> service. How do I do this?
>> The Javadoc refers to a ServiceLookup
>>
>> https://hk2.dev.java.net/nonav/hk2/apidocs/com/sun/enterprise/module/ServiceLookup.html
>>
>>
>> but I can't find this in the code repository nor can I find out how I
>> gain access to an instance of ServiceLookup.
> the easiest is to use the habitat.
>
> habitat.getAllByContract(Class<T> contract).
>
> jerome
>
>>
>> Thanks,
>>
>> David
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>