Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLBirdy: RMI Question

 
vijay selvaganapathy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
When the "server" mode is selected ,the server is started and its properties are stored in suncertify.properties. How does the client know about the service the RMI service is providing except that it knows only about the server name?.


remote_data is the reference to the Remote Implementation of Data Class.

Now when no mode is selected, the network client and gui has to run. I provide a single textbox to type in the server URL. I am confused a little here, the client types in only the Server URL (//localhost:4100) and he does not know the service name of the remote data. Do we have to list the service name so that the client can choose or am i missing something here?.


Your advice is greatly appreciated,

Regards,

VJ
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While it will be good if you list the available services or some sort of that, you would be deviating out of the scope of the assignment. I have just assumed that the client is aware of the service name that the server is running on. (The service name should be saved at the client's properties file as well)
 
Bob Reeves
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijay:

Look at the RMI registry. You must start the RMI registry at the server, and populate it with a Remote object. The client can then access the Registry and retrieve a stub to call.

I think that answers your question.
 
vijay selvaganapathy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ram and Bob,
Thx for your responses.In the server side, I create the registry using LocateRegistry.createRegistry(port) and then i rebind the remote data interface with the port. Probably i might have to list the services so that the user is aware of the services provided by the server.

Regards


VJ
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic