You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Pruitt, Byron S" <st...@hp.com> on 2009/10/13 18:41:16 UTC

Need help finding Bundle

I am developing a stand-alone bundle that produces various configuration reports on bundles contained in my application.  Going through the Bundle and BundleContext api I get most of what I want.  There are two things I can't find a way to access.

1) The Bundle components that are not a service.  There is no ServiceReference for them.
2), For a given ServiceReference, I can't list any services it references.

Does anyone know an easy to get to these things?  It's not obvious to me.

Thanks in advance,

-Steve

Re: Need help finding Bundle

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/13/09 21:21, Pruitt, Byron S wrote:
> 1)  Sorry, you are right.  I have some components that do not have interfaces.  They are activated and they perform some actions and then set in the dark I guess.  Its these that do not show up.
>
> 2)  Ah, misunderstanding on my part.  I was looking for scr:reference values.  Then I should be able to discover what I need via the Bundles.
>    

Ok, that was the confusing part. You didn't mention in your last message 
that you were talking about Declarative Services. DS != OSGi. It is a 
layer on top of the OSGi framework to simplify working with services.

In that case, there may or may not be ways to get the information you 
want from SCR, since it does have some reflective capabilities, but I am 
not personally familiar with them, but other people on the list are, so 
maybe they can respond with more details.

-> richard

> Thanks.
>
> -S
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Tuesday, October 13, 2009 2:38 PM
> To: users@felix.apache.org
> Subject: Re: Need help finding Bundle
>
> On 10/13/09 18:41, Pruitt, Byron S wrote:
>    
>> I am developing a stand-alone bundle that produces various configuration reports on bundles contained in my application.  Going through the Bundle and BundleContext api I get most of what I want.  There are two things I can't find a way to access.
>>
>> 1) The Bundle components that are not a service.  There is no ServiceReference for them.
>>
>>      
> It is not clear what you mean here. There is no such thing as bundle
> components that are not services. Only services registered by bundles
> are tracked by OSGi and can be accessed by other bundles. There is no
> other "component" concept in OSGi, other than the Bundle object itself.
>
> This is different if you are using something like iPOJO, which has a
> component concept.
>
>    
>> 2), For a given ServiceReference, I can't list any services it references.
>>
>>      
> In OSGi services do not really use services, bundles do. So, you can
> only find out which services a bundle uses.
>
> As another counterpoint, in iPOJO there is a concept of service
> contract-level dependencies, which specify which services a service uses.
>
> ->  richard
>
>    
>> Does anyone know an easy to get to these things?  It's not obvious to me.
>>
>> Thanks in advance,
>>
>> -Steve
>>
>>      
> ---------------------------------------------------------------------
> 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


RE: Need help finding Bundle

Posted by "Pruitt, Byron S" <st...@hp.com>.
1)  Sorry, you are right.  I have some components that do not have interfaces.  They are activated and they perform some actions and then set in the dark I guess.  Its these that do not show up.

2)  Ah, misunderstanding on my part.  I was looking for scr:reference values.  Then I should be able to discover what I need via the Bundles.

Thanks.

-S

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Tuesday, October 13, 2009 2:38 PM
To: users@felix.apache.org
Subject: Re: Need help finding Bundle

On 10/13/09 18:41, Pruitt, Byron S wrote:
> I am developing a stand-alone bundle that produces various configuration reports on bundles contained in my application.  Going through the Bundle and BundleContext api I get most of what I want.  There are two things I can't find a way to access.
>
> 1) The Bundle components that are not a service.  There is no ServiceReference for them.
>    

It is not clear what you mean here. There is no such thing as bundle 
components that are not services. Only services registered by bundles 
are tracked by OSGi and can be accessed by other bundles. There is no 
other "component" concept in OSGi, other than the Bundle object itself.

This is different if you are using something like iPOJO, which has a 
component concept.

> 2), For a given ServiceReference, I can't list any services it references.
>    

In OSGi services do not really use services, bundles do. So, you can 
only find out which services a bundle uses.

As another counterpoint, in iPOJO there is a concept of service 
contract-level dependencies, which specify which services a service uses.

-> richard

> Does anyone know an easy to get to these things?  It's not obvious to me.
>
> Thanks in advance,
>
> -Steve
>    

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


Re: Need help finding Bundle

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/13/09 18:41, Pruitt, Byron S wrote:
> I am developing a stand-alone bundle that produces various configuration reports on bundles contained in my application.  Going through the Bundle and BundleContext api I get most of what I want.  There are two things I can't find a way to access.
>
> 1) The Bundle components that are not a service.  There is no ServiceReference for them.
>    

It is not clear what you mean here. There is no such thing as bundle 
components that are not services. Only services registered by bundles 
are tracked by OSGi and can be accessed by other bundles. There is no 
other "component" concept in OSGi, other than the Bundle object itself.

This is different if you are using something like iPOJO, which has a 
component concept.

> 2), For a given ServiceReference, I can't list any services it references.
>    

In OSGi services do not really use services, bundles do. So, you can 
only find out which services a bundle uses.

As another counterpoint, in iPOJO there is a concept of service 
contract-level dependencies, which specify which services a service uses.

-> richard

> Does anyone know an easy to get to these things?  It's not obvious to me.
>
> Thanks in advance,
>
> -Steve
>    

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