• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Differences between Naming.bind and Context.bind

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone let me know the differences between the Naming.bind (present in java.rmi.Naming or weblogic.rmi.Naming) and the Context.bind (present in javax.naming.Context).

Given a choice between the two on a application server like weblogic 8.1 which implementation would be choosen and why. Can someone provide me with valid reasons.

Thanks
Rajkumar
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the java.rmi.Naming is used to bind name with a registry. I only have the experience with rmiregistry application. It should use the rmi native protocol to store/retrieve information to/from the registry.

The context is designed to provide an common interface for different Directory services. For example you can use LDAP as your naming service.
You have the ability to swith to another kind of directory service almost with out impact on your code.

If you are in a J2EE environment, normally you would use JNDI. When you are in J2EE environment , what you have is not only the Remote interface,
but also a lot of other information for example user information ... Most of the companies use directory services to provide those kind of information. You cannot use Naming to access those information. In the system except EJB, you also have to bind DataSource, JMS , etc.... Those should be managed by JNDI.

It is convenient for the administrator to admin the system when a directory service is used. On the other hand the rmiregistry is just
a simple program. Only the remote inteface can be bind with it. The user can only query it by name. It is possible weblogic has a better implementation which allows the admin to do more stuff on it compare to the sun implementation.

That is my 2 cents

Lin
 
Whatever you say buddy! And I believe this tiny ad too:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic