aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI registry auto start Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI registry auto start" Watch "RMI registry auto start" New topic
Author

RMI registry auto start

Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
Anyone starts the RMI registry from within the server code if it is not already running? The issue I am facing is: if I don't then I depends on the grader to start the registry correctly. i.e. set the CLASSPATH to include runme.jar before starting the registry.
Otherwise, the registry can't find the server stub and will throw ClassNotFoundException.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
What do you think you should do?
Where in the assignment instructions does it state you should depend on there being an RMI registry running (or not running)?

NEVER assume anything when it comes to the state of systems you're deploying to UNLESS you control the state of those systems completely.


42
Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
Well right now my user guide explicitly states that RMI registry must be started manually before the server can be started.

Can I expect that the grader (aka my user) at least know how to follow instructions in the user guide?

Setting the CLASSPATH from the shell or Dos window should not be a violation of this rule right?
You must not require manual editing of any files by the examiners
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
why risk it?

The assignment document contains the exact commandline you should require to start the application (at least mine does).
Anything else would therefore likely be an automatic failure.
Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
why risk it?

The assignment document contains the exact commandline you should require to start the application (at least mine does).
Anything else would therefore likely be an automatic failure.


I think you misunderstood the issue. My assignment also has the command line instructions for starting the app.
The issue is whether the RMI registry can find the server stub when the application is started. I was surprised that no one runs into this?
I ran my application with an empty classpath.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
You still don't understand, do you?

As I said, NEVER assume ANYTHING about the state of the system in which your application will operate except that which is explicitly stated as being available (in this case a "java" command of the version you mention, which currently is allowed to be only 1.5 (and soonish 1.6) with associated standard API).

It's up to YOU to start the registry if it's not already running, not up to the assessor.

Based on my assignment, I'd assume the assessor to automatically fail me if I didn't start the rmi registry from my server application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI registry auto start