aspose file tools*
The moose likes Distributed Java and the fly likes Should I use Naming or InitialContext to bind my server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Should I use Naming or InitialContext to bind my server?" Watch "Should I use Naming or InitialContext to bind my server?" New topic
Author

Should I use Naming or InitialContext to bind my server?

Stevens Miller
Ranch Hand

Joined: Jul 26, 2012
Posts: 567
    
    4

I have an rmiregistry process running when I execute the main method in this class:


It works perfectly.

This code also works perfectly:


They are the same, except for Line 19. Using the debugger as far as I can, I don't see that these two classes (InitialContext and Naming) rely on the same code, yet (in this application) they do very similar things.

Why are there two ways to bind a registry entry to an object?

What, if anything, would make one preferable to the other?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Should I use Naming or InitialContext to bind my server?