Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMIRegistry  RSS feed

 
Gupta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following requirement.

"Instead of explicitly starting rmiregistry, the server class start the registry at a specified port, which is passed as a command line parameter. The client will have to connect the rmi server running on this port"

I have been trying to figure out how it can be done. Could someone help me in doing this.

Any help is greatly appreciated.

Regards,
Gupta
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gupta,
Pardon me if I am stating the obvious, but do you know about the java.rmi.registry.LocateRegistry class?
Perhaps the "createRegistry()" method is what you require?

Good Luck,
Avi.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Gupta" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!
 
Eusebio Floriano
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I�m a newbie in RMI.
Does rmiregistry provide the lookup service ?

Regards,
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vinicius Boson:
I�m a newbie in RMI.
Does rmiregistry provide the lookup service ?


Yes, though it's just a wrapper for a JNDI lookup server that RMI service provides can register themselves with. J2EE servers often provide a registry, and rmid can do so as well - though it took me a while to figure out how to make it provide everything on port 1099 instead of 1098.
 
Rahul Sapkal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gupta,

Its a good approach to start RMI Registry in your process.
Here is a link to the example, that might help.

http://www.javareference.com/jrexamples/viewexample.jsp?id=8

Rahul.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!