Hi Nipuni,
I was not involved in the original development of Aries jndi and also am
not very familiar with the spec.
Generally it is possible that Aries also implements custom parts that
are compatible but not part of the spec. So it might make sense to also
ask this on the Aries user or dev list.
I have checked the history of the code you mentioned. It seems to be
written by Jarek Gawor but he does not seem to be active in the Aries
project anymore. Maybe you can ask him directly.
Maybe it is also a good idea to take a step back. I guess you want to
solve some concrete problem. Can you explain what you try to achieve?
Christian
On 31.03.2016 08:42, Nipuni Piyabasi Perera wrote:
Hi Christian,
Thanks for the replies. (I received replies through the osgi-digest mail).
Yes. I went through the Apache Aries implementation and I found some
confusions and I wanted to clarify them with osgi-dev. Some of the
examples are as follows:
1. Using osgi: scheme and servicelist path. "If this osgi:servicelist
scheme is used from a lookup method then a Context object is
returned instead of a service object" - specification page 508.
Say we got a Context object from a URL (eg:
context.lookup("osgi:servicelist/<interface-name>")). We again can
call a lookup using the received context as below:
*Context listContext =
context.lookup("osgi:servicelist/<interface-name>");*
*Object service = listContext.lookup(<some-parameter>)
//what should be the parameters passed here?*
As per the Apache Aries implementation, the parameters of the second
lookup() method is a service id. So the OSGi service query will be
perform reading the interface from the first URL (i.e
*"osgi:servicelist/<interface-name>"*) and the service id from the
second URL (i.e "*<some-parameter>*"). I could not find such
description from the specification. (Correct me if I am wrong).
2. As per the Apache Aries implementation you can call list()
and listbindings() methods for both "service" and "servicelist" paths.
Both method calls directs to a same method which passes an empty
string as the parameter to list() method [1]. Is this the
expected behavior? (Or specification may not provide each and every
implementation detail and developers might have to taken decisions
while implementing.)
[1]
https://github.com/apache/aries/blob/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryContext.java#L63
Thanks,
Nipuni
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev