Not to be a complete "reposting the same topic for the 18th time" goober, but I'd really like to verify a few things about my RMI implementation.
Below, I've pasted a piece of my requirements regarding RMI...
******
Restrictions on RMI
To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically:
You must not require the use of an HTTP server.
You must not require the installation of a security manager.
You must provide all classes pre-installed so that no dynamic class downloading occurs.
You must use RMI over JRMP (do not use IIOP)
*****
Being an RMI newbie, I zipped through the jGuru tutorial on the Sun site and I also have Max Habibi's book, which contains some very useful RMI information. That said, my RMI server startup code looks like:
LocateRegistry.createRegistry(serverPort);
DataRMIServer drmis = new DataRMIServer();
Naming.rebind(RMI_SERVER_NAME, drmis);
And my client code looks like:
server_ = (ApplicationFunctionalityIF)
Naming.lookup(
"rmi://"+serverLocation+":"+serverPort+"/"+RMI_SERVER_NAME);
Now for the questions/verifications:
- I'm not doing anything with an HTTP server because I'm not setting any of the relevant JVM parms (ex. java.rmi.server.codebase) and my network clients will have all of the rmic generated code (only the stub and interface extending Remote are required I believe).
- Even though I think a SecurityManager is required for dynamic class loading, I haven't written any code referring to a SecurityManager. And I haven't tweaked any settings that should affect one either, so I must not be "requiring the installation" of one, eh?
- Since I don't specify the -iiop option when I use the rmic tool, I must be using JRMP.
- My RMIServer extends UnicastRemoteObject and implements DataRMIServerIF (which extends the Remote and ApplicationFunctionalityIF interfaces) and since I have gone with UnicastRemoteObject, there is no need to worry about clients dealing with "disappearing objects" (jGuru tutorial mentioned this in regards to Distributed Garbage Collection), right?
- Since I have gone with UnicastRemoteObject (I'm assuming this implementation runs the whole time the server is up), there is no need to consider using the Unreferenced interface, right?
- I don't need to handle starting the RMI registry because my server code does this programmatically.
Thanks a lot.
-Tim