Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

rmiregistry  RSS feed

 
Cristian Negresco
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What is rmiregistry doing behind the scene?
How could that is able to give a reference to the remote object?
Do you know about any documentation if one would like to implement his own rmi registry?
thanks,
Cristian
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cristian Negresco:
Hi,
What is rmiregistry doing behind the scene?
How could that is able to give a reference to the remote object?
Do you know about any documentation if one would like to implement his own rmi registry?
thanks,
Cristian

RMI registry is more like a DNS server, or like Map that maps the remote interface name with the location of the rmi server (or rmi server stub), the client use this location information to invoke the methods in the server.
 
Cristian Negresco
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thank you for your answer.
The stub the rmic creates is a class.
Assuming that I have other means of communication between jwm (streams)how could I send the stub to the client so that he will be able to make remote calls. On which object these calls are to be made? The stub is a class, who and how initializes it?
Do you have some detailed documentation about the workings of rmiregistry?
BR,
Cristian
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there are two ways one is wrapping the stub along with the client classes at deployment time and you can also dynamice download the stub.
This article explains about loading the stub dynamically
http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html
[ October 30, 2003: Message edited by: Vinod John ]
 
Cristian Negresco
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The problem is how to get a reference to the remote object by using io streams.
I have absolutely no problem finding the Server Stub class as both the client and the server are running on the same machine.
Cristian
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well actually , you are a little off. You don't get a reference to the remote object with RMI. You get a reference to a local version of an object that implements an agreed upon interface that both the server and the client use. I don't think you can truly share an object between 2 JVMs. If you are only using a single JVM to run this, then whats the point of RMI type communication anyway?
What is your reason for not wanting to use the registry? It doesn't make a lot of sense to try to reinvent RMI if there's not a good reason...
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!