aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to close a rmi registry with codes??? 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 "How to close a rmi registry with codes???" Watch "How to close a rmi registry with codes???" New topic
Author

How to close a rmi registry with codes???

Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
I create a registry in my assignment:
Registry registry = LocateRegistry.createRegistry(1099);
But how to stop it or close this registry, because I want to use a different port to start the registry server.
Waitting for experts' answer, thanks.
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

But how to stop it or close this registry, because I want to use a different port to start the registry server.

Just stop the server, that will stop the registry.
Eugene.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

You can't stop the registry with any code, only by stopping the server.
Rene


Regards, Rene Larsen
Dropbox Invite
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Um, in my submission, when I start the RMIRegistry through code, when the server closes so does the RMIRegistry, but I didn't have to do anything special to close it at all, no code needed.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to close a rmi registry with codes???
 
Similar Threads
B&S: Close Registry
Restarting RMI Registry
Shut down RMI Registry
Client runs even when server stopped
Equivalent of COM/OLE