File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Starting and Stopping the Server (RMI) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Starting and Stopping the Server (RMI)" Watch "Starting and Stopping the Server (RMI)" New topic

Starting and Stopping the Server (RMI)

Adam Till
Ranch Hand

Joined: Oct 11, 2002
Posts: 41
Hi All
Thought I would 'quickly' build a GUI for the server. Got it to start and stop but when it comes to restarting there is an error. To start the server I have this line:-
How do I re-start without an error of 'ObjID already in use', caused by re-running the above line?
I have tried the Registry.getRegistry(port) but it seems to return the same reference before and after the creatRegistry line. So not sure how to spot it.
A cheat would be to have a boolean flag this is true after its first created.
Any ideas

Adam Till<br />SCJP SCJD SCWCD
Daniela Ch
Ranch Hand

Joined: Dec 13, 2002
Posts: 96
Hi Adam,
how do you stop the server? I read that when you stop the server with system.exit() it closes the registry...
maybe you can try this?
I agree. Here's the link:
subject: Starting and Stopping the Server (RMI)
It's not a secret anymore!