File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Starting the Registry Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Starting the Registry" Watch "Starting the Registry" New topic
Author

Starting the Registry

Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
Hi, I have 2 doubts regarding the rmiregistry.
1.There are two ways of starting the rmiregistry:
.Enter the command rmiregistry in command prompt.
.LocateRegistry.createRegistry(port).
Which one should be used for this assignment?
2.Can I always bind my remote object on the default port or should I prompt the user to enter through command line parameter?
Thanks.
Akanimo Udoh
Ranch Hand

Joined: Jun 11, 2001
Posts: 48
1. You can use either, though doing so internally (LocateRegistry.createRegistry(port)) makes it easier for the user. What i'd recommend would be for you to try and bind the server to the specified port on an external (command prompt rmiregistry) if that fails then you know there is no rmiregistry running so you can create one internally with the call to LocateRegistry.createRegistry(port).
2.Its best that you make the user specify a port since he may be running a variety of services on different ports.
Akanimo.
 
 
subject: Starting the Registry
 
Threads others viewed
How wo stop and kill rmiregistry ?
Please Help! Clarification on Local vs Remote Approach.
Why my RMI connection throw exceptions?
stopping rmiregistry
Cannot Start RMI Server
developer file tools