• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI - bind vs rebind

 
Glen Iris
Ranch Hand
Posts: 172
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Folks,

While setting up an RMI connection it came to my attention that I can use or .

The main difference from what I can tell is:

If using the rebind method, any existing binding for the name is replaced. Thus is removing the chance of an AlreadyBoundException.

So some questions-

  • 1
  • When the program exits, will all binding be cleanly undone?
  • 2
  • Can you share your thoughts on the use of either one over the other?
     
    Roberto Perillo
    Bartender
    Posts: 2271
    3
    Eclipse IDE Java Spring
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I myself didn't care about this... I just used rebind and was happy
     
    Roel De Nijs
    Sheriff
    Posts: 10457
    137
    AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I used rebind-method from Registry.
     
    Anayonkar Shivalkar
    Bartender
    Posts: 1557
    5
    Eclipse IDE Java Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Ditto here

    The reason being - we are really not required to write a 'very high performance' code.

    Secondly, I used to click 'close' button of my GUI window to shut down the application so, frankly, I didn't care about cleaning up - oh, and I also used rebind instead of bind.

    Bottom line : everybody is happy as long as you are not breaking any 'MUST' requirement.
     
    Glen Iris
    Ranch Hand
    Posts: 172
    Chrome Java Netbeans IDE
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you chaps.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic