Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Registry.rebind or Naming.rebind ?

 
Farouk Mohamed1
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am struck can you tell me the difference.
I start a registry in the code using LocateRegistry.createRegistry and should i have to use
registry.rebind("rmi://localhost/FlightServices:1099",new RemoteConnection()");
or
Naming.rebind("rmi://localhost/FlightServices:1099",new RemoteConnection()");
What difference does it make? please explain
Farouk
 
Farouk Mohamed1
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pleas guys
Any one help me on this
Farouk
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your JDK has sources for the Java API - in Naming.java, it saysSo the method in Naming just delegates the real work to the Registry method.
- Peter
 
Farouk Mohamed1
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks peter
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!