Hi all,

I have a couple of questions on the intended behavior of importing a remote 
service using Remote Service Admin. Specifically the intended behavior of 
importing a service that provides multiple interfaces, of which an individual 
user of the service typically only uses one.


1.       Should all the exported interfaces of the remote service be present in 
the OSGi runtime of the user of the remote service?

2.       Should the bundle holding the component using the remote service be 
able to 'see' all the exported interfaces, even though it uses only one of them?

What I noticed is that if an endpoint lists multiple interfaces, that the 
bundle in which the user of the remote service contained must be able to 'see' 
all interfaces. Is that expected behavior? Is it desirable that the user of the 
service, which is unaware of the fact that the service is being resolved as a 
remote service, needs to import additional packages in order to resolve the 
interface(s) it does not use? I have prepared a small application [1] that 
reproduces what I have observed.

I had a look in the R7 compendium specification and in section 122.5.7 I found 
the following phrase:

Interfaces should be loadable by the bundle otherwise that bundle can not use 
the interface in its code. If an interface cannot be loaded then it can be 
skipped.

Am I correct in drawing the conclusion that the RSA implementation should be 
able to initialize the proxy towards the remote service, even though the using 
bundle is only able to see a subset of the exported interfaces? Are there any 
suggestions on how a RSA implementation should 'skip' the loading?

Best regards,

Arnoud Glimmerveen

[1] https://github.com/glimmerveen/osgi-rsa-test




------------------------------------------------------------------------------------------------------------
Disclaimer:

If you are not the intended recipient of this email, please notify the sender 
and
delete it.
Any unauthorized copying, disclosure or distribution of this email or its
attachment(s) is forbidden.
Thales Nederland BV will not accept liability for any damage caused by this 
email or
its attachment(s).
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of
Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to