This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Starting the Registry  RSS feed

 
Adithya Rayaprolu
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!