Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to start registry?

 
Roy Augustine
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I used RMI for my Networking. The book I followed says that I have to start rmi registry by using the command

It also says I can start registry inside program. But that books doesn�t says how.
But my program works fine even with out starting the registry. I tested it even in two different machines and it works fine. But I am not sure whether I have to start the registry. Any help? Am I doing something wrong?
2. If I have to start the registry then how can I do it using code?
Thanks in advance
Roy.
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roy.

2. If I have to start the registry then how can I do it using code?

You can start the RMI registry, on the server side, something like below.

The fact that you say your app works even without that sounds a bit worrying. Something is wrong somewhere, or you've started it without knowing. Are you sure you're testing it in server/client mode?
My suggestion is to make sure you understand how the RMI system works. Study it up a bit. Most probably you'd need that info too for the exam.
Hope you come right.
J
 
Roy Augustine
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jacques
Thanks for your quick reply.
I have the codes in the same way you said.
I didn�t know that

will start the registry. I thought createRegistry(port), just creates the registry for us and we have to start the registry separately.
If that is the case then I am all set for now(I think).
Thanks a lot again. You saved me from lots of worry. I have been searching for an answer in all the places for last couple of days.
Roy.
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yip, that starts up the registry.
Glad I could help.
J
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic