aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alasdair Nottingham <>
Subject Re: jndi integration question
Date Fri, 09 Oct 2009 15:47:19 GMT

You are right. The Javadoc does say that list and listBindings works
relative to the "named Context" and since lookup doesn't return a
Context we shouldn't return anything. I would like to be able to
support JNDI querying more than a single service though. I think it is
too late to get it into the OSGi JNDI specification, so we may have to
do something Aries specific here. So unless you object I'll raise a
JIRA to remove the offending code and raise this issue with the OSGi
EEG to see if we can get something done in the spec, or if it is too


2009/10/6 Jarek Gawor <>:
> Hi,
> I have a question about the jndi integration code. The
> ServiceRegistryContext.lookup("osgi:services/foo") returns a service
> instance registered with interface foo. But
> ServiceRegistryContext.list("osgi:services/foo") (or listBindings())
> returns a list of services registered with that interface. That's a
> bit odd to me since I thought if you can do list() or listBindings()
> on a name, the lookup() on the same name should return
> javax.naming.Context object. That is, for example, ((Context)
> context.lookup("bar")).listBindings("") should return pretty much the
> same info as doing context.listBindings("bar").
> I know the lookup() behavior is mandated by the spec but what about
> the list()/listBindings()? Seems to me like the ServiceRegistryContext
> should not implement the list()/listBindings() methods.
> Jarek

Alasdair Nottingham

View raw message