• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Need to start registry?

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yip, that starts up the registry.
Glad I could help.
J
 
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic