Has anyone ever exposed the proxies contained in a Registrar via JNDI?
I'm trying to integrate with some software that doesn't know about
Jini/River but does speak JRMP and expects to get the remote objects
from JNDI. There's a org.dancres.jini.jndi library that does something
like this at http://wiki.cantara.no/display/blitz/Jini+JNDI but it's not
very flexible, and dates from 2004. I'm thinking along these lines:
* create a class that implements javax.naming.Context that takes a
net.jini.lookup.ServiceDiscoveryManager argument
* add lookup() methods that delegate to
ServiceDiscoveryManager.lookup()
* somehow map the requested JNDI name to a ServiceTemplate
- Maybe just look for a matching net.jini.lookup.entry.Name which
String.equals() the JNDI name?
(the existing org.dancres.jini.jndi library takes this approach)
- invent a javax.naming.Name implementation that wraps a
ServiceTemplate?
- invent some more complex URL-based naming? Like so:
"jini://*/?net.jini.lookup.entry.Name=Foo" for matching a service
attribute
"jini://*/?java.lang.Class=com.sun.jini.reggie.Registrar" for
matching a service interface
You could possibly even do JoinManager registration via this JNDI
context's bind() methods if we had a Jini-specific javax.naming.Name
implementation.
Chris