This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 17250
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to close a rmi registry with codes???