Comments (2)
Comment author: Nipuni Perera <[email protected]>
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:
-
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/ ?
-
As per the specification, listBindings() and list() methods will return NamingEnumeration objects. Do both "service" and "servicelist" paths need to support aforementioned methods?
a. context.list("osgi:service/") is this a valid URL ?
b. context.list(osgi:servicelist/) is this a valid URL ?
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") NamingEnumeration<NameClassPair> namingEnumeration = listContext.list("osgi:service/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) or what should passed as the parameters to the list() method) ?
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
Thanks,
Nipuni
from design.
Comment author: Nipuni Perera <[email protected]>
I have raised this in osgi-dev list, and as per the replies:
-
"osgi:servicelist/" is a valid query. (this answers my first question)
-
We can imply that the other methods such as bind(), rebind() , unbind() , rename() as operations that are not supported with the provider. (this answers my last issue)
Appreciate if anyone can give a clarification on the other issues.
Seems my second question is not much clear. Hence adding the same question with more details below:
-
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/") is this a valid statement ?
b. eg: context.list(osgi:servicelist/) 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") NamingEnumeration<NameClassPair> namingEnumeration = listContext.list("osgi:service/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)) ?
-
In a scenario as above say we received a context object with lookup method.
Context listContext = context.lookup("osgi:servicelist/");
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/") or listContext.lookup("|")"
Thanks,
Nipuni
from design.
Related Issues (20)
- Ordering issue with RFC-217 "osgi.jaxrs.filter.base" filters HOT 2
- rfc-217 should clarify how ApplicationPath annotation can affect the base path HOT 1
- RFC-217 support for Feature, DynamicFeature, ContextResolver and other providers HOT 3
- RFC-221 Transaction control: Release resources managed by JDBCConnectionProvider HOT 4
- Typos in RFC 221 Transaction Control - Drafs HOT 1
- RFC-229 MQTT Wildcard topics HOT 2
- [Converter] Conversion of Collections HOT 2
- R7 Core draft 2017-3, 10.8.4.3 (Capability and Requirement version params) HOT 2
- Configurer specification - partial configurations and merging (R8+) HOT 2
- Feature: support Optional<T> for DS service reference type HOT 3
- [RFC 216/ PushStream] Inconsistency between JavaDoc/Spec Section 706.7.14.6 and the reference implementation HOT 1
- [RFC 216/ PushStream] Inconsistent time unit of PushbackPolicyOption.getPolicy() between JavaDoc and implementation HOT 4
- Component "outjection" for declarative services. HOT 1
- rfc-241 (Feature) - json structure and comment HOT 4
- Offer BundleContext#registerService without HashTable HOT 4
- [JPA Service] allow a JPA Service to use the (non-)jta-data-source attribute instead of the javax.persistence.jdbc.driver property HOT 1
- DS 1.4 Component Property Types: Allow meta annotations or static fields for generating constant component properties HOT 3
- DS 1.4 Component Property Type Annotations: Allow elements which only optionally create component properties HOT 1
- DS: Allow a condition towards a framework property HOT 3
- DS: Allow conditions for a class being available to the classloader HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from design.