aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI - bind vs rebind Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI - bind vs rebind" Watch "RMI - bind vs rebind" New topic
Author

RMI - bind vs rebind

Glen Iris
Ranch Hand

Joined: Jul 13, 2011
Posts: 164

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?


    OCPJP 6, OCMJD
    Roberto Perillo
    Bartender

    Joined: Dec 28, 2007
    Posts: 2247

    I myself didn't care about this... I just used rebind and was happy


    Cheers, Bob "John Lennon" Perillo
    SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
    Roel De Nijs
    Bartender

    Joined: Jul 19, 2004
    Posts: 4926
        
      10

    I used rebind-method from Registry.


    SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
    http://www.javaroe.be/
    Anayonkar Shivalkar
    Bartender

    Joined: Dec 08, 2010
    Posts: 1464
        
        5

    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.


    Regards,
    Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
    Glen Iris
    Ranch Hand

    Joined: Jul 13, 2011
    Posts: 164

    Thank you chaps.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: RMI - bind vs rebind
     
    Similar Threads
    rmi based problem
    Java RMI Beginner
    NotBoundException on clientside related to Naming.lookup
    Naming.lookup arguments
    NX: Please Help! - Naming.rebind and Port