On 21.02.2011 12:19, Neil Bartlett wrote:
> On Mon, Feb 21, 2011 at 10:49 AM, Peter Kriens
> <[email protected]> wrote:
>> I think we have think a bit deeper. Assume you have 2 exporters of
>> IFoo that are both compatible with the proxy you generate.
>> Shouldn't you create a proxy for both?
>
> Ideally yes, but this doesn't seem to be compatible with the RSA
> spec... if the TM calls importService(EndpointDescription) then it
> gets back a single ImportRegistration, which in turn points to a
> single ImportReference which points to a single ServiceReference.
> The DP can choose any exporter of the service API, but only one.
But why would you want to create n (>1) proxies for 1 local service
request? Without additional logic the mapping from an EPD to one service
object (of potentially multiple) will always be ambiguous.
> If the DP did need to proxy all of the API exports then it would
> have to create an on-the-fly generated bundle for each version (as
> per our previous discussion). These would probably need to use
> either Require-Bundle or Import-Package+bundle-symbolic-name
> attribute, to make sure they wire to the expected export.
I'd like to see an implementation of that. The workaround smelliness
here should be a pretty clear indicator that something else is wrong.
> Incidentally, can anybody comment on how the RI handles this
> currently?
As I said on Skype I just checked again - it uses DynamicImport:* for
the RSA transport ("dsw") bundle.
-h
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev