title: java RMI and/or JNDI: binding for objects that are not singletons
body: <p>OK, I get how to use RMI to bind a singleton server object with a well-known name so that other JVMs can find it.</p>
  
  <p>Let's say I have a number of processes, each running a JVM, and each creating an object supporting the <code>FooRemote</code> interface, which I wish to expose via RMI. Each process has an unpredictable life cycle that corresponds to something, whether it is from user input, or availability of a resource. </p>
  
  <p>How can I bind these without getting naming collisions? Would using JNDI help?</p>
  
  <p>In effect, what I wish to do is to have a pool of similar objects, each on separate JVMs (reason for doing so is important but beyond the scope of this question). I need a client to be able to enumerate which objects are available, and choose one for further interaction.</p>
  
  <p>(The reason I emphasize the separate JVMs is that if they were all in the same JVM, I could just have a singleton manager that handles the group pool, and make all the group instances accessible through the manager. But I can't do that if the group pool consists of independent instances in separate JVMs. )</p>