initial-context

Java RMI InitialContext: Equivalent of LocateRegistry.createRegistry(int) ?

I am trying to some pretty basic RMI: // Context namingContext = new InitialContext(); Registry reg = LocateRegistry.createRegistry(9999); for ( int i = 0; i < objs.length; i++ ) { int id = objs[i].getID(); // namingContext.bind( "rmi:CustomObj" + id , objs[i] ); reg.bind( "CustomOb...

Can I build a directory structure (JNDI) with the file based context factory com.sun.jndi.fscontext.RefFSContextFactory

Using the com.sun.jndi.fscontext.RefFSContextFactory file based JNDI context factory and it seems to only allow 1 binding file in location you specify. For example Hashtable properties = new Hashtable(2); properties.put(Context.PROVIDER_URL,"file:///tmp/jms/mycontext"); properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscon...

How can I specifiy the drive letter (windows) for the PROVIDER_URL of the JNDI InitialContext

I am using the com.sun.jndi.fscontext.RefFSContextFactory file based JNDI context factory. It seems to take the drive of the where the java application is started in. Hashtable properties = new Hashtable(2); properties.put(Context.PROVIDER_URL,"file:///tmp/jms/mycontext"); properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.f...