This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Close Registry

 
Ye Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using LocateRegistry.createRegistry(port), I can start the registry. However, I don't know how to close it. Any clue? I mean not just unbind, but close the port that the registry was listening on.

Thanks!
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ye Lee:
By using LocateRegistry.createRegistry(port), I can start the registry. However, I don't know how to close it. Any clue? I mean not just unbind, but close the port that the registry was listening on.

Thanks!


I used both Naming.unbind and UnicastRemoteObject.unexportObject!

Alex
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic