users@glassfish.java.net

Re: registering OSGi services in v3

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Tue, 09 Jun 2009 22:33:43 -0700

it's certainly a good solution, however, imo, I would not say that it
is particularly user friendly, Declarative Services makes it a bit
easier and keep the OSGism at the metadata level.

shameless plug, the promised blog on OSGi declarative services :
blogs.sun.com/dochez

jerome

On Jun 9, 2009, at 8:57 PM, Sahoo wrote:

> Why can't you just do it the OSGi way? i.e., Get hold of a
> BundleContext via the BundleActivator of your bundle, and call
> registerService method on it.
>
> Sahoo
>
> glassfish_at_javadesktop.org wrote:
>> Hi,
>>
>> I have read Jerome's excellent blog entry at http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_3
>> .
>> Unfortunately, I am not that deep in Spring, so I want to register
>> an OSGi service from an OSGi bundle itself (the bundle contains the
>> implementation).
>>
>> It is not clear to me how the binding between the
>> @Resource(mappedName="secondService") in the WEBCLIENT and the OSGi
>> service registry is done. I assume that this is what the spring-
>> osgi thing does for you, but it probably comes down to registering
>> the service implementation with a specific property with the OSGi
>> registry?
>>
>> Thanks,
>>
>> - Johan
>> [Message sent by forum member 'johanvos' (johanvos)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=350138
>>
>> ---------------------------------------------------------------------
>> 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
>