Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI bind()?

 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well sorry for asking foolish Question.but this is something i hav not been able to understand...
While registering our home object to some directory service using proprietry vendor specific file for a specific bean , we mention a key value pair(Myhome, "home").Here home is nick name for home object that we use while looking up for registered specific bean through JNDI.
My question is
1. what if i give similar nickname to another home object corresponds to another bean?
2. If it gives a error, how should i confirm that mentioned name will not be existing already(take a case of hundreds of bean playing in single application server)
Thanks
Vikas
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bind() method will throw a NameAlreadyBoundException (or something similar) if the JNDI tree already has an object bound to the name you provided.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic