Posted on 2011-05-10
I'm looking at Java's RMI and am missing a few key points that hopefully others can answer easily. (I've read about 20-30 different articles and haven't figured these things yet)
1. When an RMI server program runs on machine A and registers itself, what is the mechanism. I see a "java.exe" in the task list for it. Is that the java that ran the server program (so I could set the JVM parameters for the server by tweaking how I invoke server.jar?)
2. Can multiple clients connect to the same server, and if so, for simple servers that run quickly (a time server, for example, or an echo server), does it run serially, or are there locks and things I should be aware of?
3. For more complex processing, do you create a new thread or a new process and hook up the process to the client? (some sample code would be useful here)
4. How do you terminate the server if necessary (right now, my best solution is to have a "serverStop" routine as one of the interface routines)
I appreciate any and all help, and will divide the points among all useful answers!