• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI Aliasing  RSS feed

 
Kalyan Mudumbai
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there an aliasing concept in JNDI? For example:

If I have a hashtable and I bind it to the context in the following way:


ctx.bind("oldName",hashTable);

And if I want to refer to the same hashTable with another name, may be: newName, then, can I do something like:


ctx.setAlias("oldName","newName");

so that I can later do a


Hashtable myTable = (Hashtable)ctx.lookup("newName");

and get the same old hashtable that has been bound to the JNDI tree.

Thanks,
Kalyan.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. But then I can't see why you'd want to. You can use JNDI redirection in WebSphere - where you create a Global JNDI name which is just a pointer to another JNDI name, but that's the closest you can get.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!