felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bengt Rodehav <be...@rodehav.com>
Subject Re: iPOJO and ServiceReference
Date Tue, 13 Apr 2010 12:38:24 GMT
Richard,

I just filed the following feature request:

https://issues.apache.org/jira/browse/FELIX-2279

/Bengt

2010/4/9 Richard S. Hall <heavy@ungoverned.org>:
> On 4/9/10 8:07, Bengt Rodehav wrote:
>>
>> I'm using iPOJO to publish OSGI service on Felix. For logging purposes
>> (and for some other purposes as well), I need access to the started
>> service's ServiceReference. How can I get hold of the ServiceReference
>> from an iPOJO component? Intuitively it makes sense to start using it
>> in the method marked with @Validate since I assume that the service
>> has then just been started.
>>
>> How can I accomplish this?
>>
>
> Actually, there is no automatic way for a component to get this information
> about itself. You'd need to get the bundle context in your constructor and
> then manually publish your services in the @Validate method.
>
> I suppose it would be possible to support this by allowing the @Validate
> method to receive a set of service references. Although this hasn't been
> needed up until now, feel free to open a feature request if you think it is
> necessary.
>
> Thanks.
>
> -> richard
>
>> /Bengt
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

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


Mime
View raw message