Hi all,

Thanks for the replies. (I received replies through the osgi-digest mail).

Seems my second question is not much clear. Hence adding the same question
with more details below:

2. As per the specification, listBindings() and list() methods will return
NamingEnumeration objects. Do both "service" and "servicelist" paths need
to support aforementioned methods?
    a. eg: context.list("osgi:service/<query>") is this a valid statement ?
    b. eg: context.list("osgi:servicelist/<query>") is this a valid
statement ?
    c. If this(above (b)) is a valid scenario, does the Context object need
to  obtain first, before doing list() and listbinding() queries? (Please
find a sample code below)

        Context context = jndiContextManager.newInitialContext();
        Context listContext =
context.lookup("osgi:servicelist/org.my.jndi.osgi.services.FooService")

- In a scenario as above, is it valid to pass two different names to list()
and lookup() methods (i.e context.lookup("osgi:servicelist/SERVICE-A") and
do a context.list(osgi:servicelist/SERVICE-B)) ?
        NamingEnumeration<NameClassPair> namingEnumeration =
listContext.list("osgi:service/org.my.jndi.osgi.services.FooService");

- In a scenario as above say we received a context object with lookup
method.
    Context listContext = context.lookup("osgi:servicelist/<service-name>");

  We should be able to do lookup() calls with this received context object.
In such cases what should pass as the URL.
  eg: is it "listContext.lookup("osgi:servicelist/<service-name>") or
listContext.lookup("<service-name>|<service-id>")"

(I also have raised the queries in OSGi public Bugzilla)

Thanks,
Nipuni

On Wed, Mar 30, 2016 at 9:37 AM, Nipuni Piyabasi Perera <
nipuni880...@gmail.com> wrote:

> Hi all,
>
> Appreciate any response on the above questions.
>
> Thanks,
> Nipuni
>
> On Thu, Mar 24, 2016 at 8:05 PM, Nipuni Piyabasi Perera <
> nipuni880...@gmail.com> wrote:
>
>> Hi all,
>>
>> I am trying to implement OSGI URL scheme support for JNDI following the
>> OSGI service specification[1]. While implementing the OSGI URL scheme I
>> encountered following issues.
>> As per the specification, Following are the confusions I have:
>>
>>    1. A lookup with osgi:service path will return a service while a
>>    servicelist path returns an context object. Does a query
>>    "osgi:servicelist/" is valid? Or is it mandatory to have a query followed
>>    by the osgi:servicelist/ ?
>>    2. As per the specification, listBindings() and list() methods will
>>    return NamingEnumeration objects. Do both "service" and "servicelist" 
>> paths
>>    need to support aforementioned methods?
>>       1. context.list("osgi:service/<qname>") is this a valid URL ?
>>       2. context.list(osgi:servicelist/<qname>) is this a valid URL ?
>>          1. If this is a valid scenario, does the Context object need to
>>          obtain first before doing list() and listbinding() queries? (Please 
>> find a
>>          sample code below)
>>          2.
>>
>>          Context context = jndiContextManager.newInitialContext();
>>
>>          Context listContext = 
>> context.lookup("osgi:servicelist/org.my.jndi.osgi.services.FooService")
>>
>>          NamingEnumeration<NameClassPair> namingEnumeration =
>>
>>                  
>> listContext.list("osgi:service/org.wso2.carbon.jndi.osgi.services.FooService");
>>
>>          3.
>>
>>          In a scenario as above, is it valid to pass two different names to 
>> list() and lookup() methods (i.e 
>> context.lookup("osgi:servicelist/SERVICE-A") and do a 
>> context.list(osgi:servicelist/SERVICE-B)) ?
>>
>>          3. As per the specification we mainly support list(),
>>    listbindings(), and lookup() methods. Can we consider the other methods
>>    such as bind(), rebind() , unbind() , rename() as  operations that are not
>>    supported  with the provider?
>>
>> Appreciate any input on above queries.
>>
>> [1] https://osgi.org/download/r6/osgi.enterprise-6.0.0.pdf
>> <https://www.osgi.org/developer/downloads/release-6/release-6-download/>
>>
>> Thanks,
>> Nipuni
>>
>> --
>> Nipuni Perera
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> Email: nip...@wso2.com
>> Git hub profile: https://github.com/nipuni
>> Blog : http://nipunipererablog.blogspot.com/
>> Mobile: +94 (71) 5626680
>>
>
>
>
> --
> Nipuni Perera
> Software Engineer; WSO2 Inc.; http://wso2.com
> Email: nip...@wso2.com
> Git hub profile: https://github.com/nipuni
> Blog : http://nipunipererablog.blogspot.com/
> Mobile: +94 (71) 5626680
>



-- 
Nipuni Perera
Software Engineer; WSO2 Inc.; http://wso2.com
Email: nip...@wso2.com
Git hub profile: https://github.com/nipuni
Blog : http://nipunipererablog.blogspot.com/
Mobile: +94 (71) 5626680
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to