• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Logical names Vs JNDI names

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone tell me the difference between a "logical name" like "java:/comp/env/ejb/Fibo" and a jndi name like onl "FiboBean".
I can use both of of them as inputs to InitialContext constructor, but what is the difference?
I am new to ejb, so this might be a stupid question, but would appreciate any explanations.. .
Thanks in advance,
Shetal
[ August 19, 2005: Message edited by: shetal bansal ]
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by shetal bansal:
Hi,
Can anyone tell me the difference between a "logical name" like "java:/comp/env/ejb/Fibo" and a jndi name like onl "FiboBean".
I can use both of of them as inputs to InitialContext constructor, but what is the difference?
I am new to ejb, so this might be a stupid question, but would appreciate any explanations.. .
Thanks in advance,
Shetal

[ August 19, 2005: Message edited by: shetal bansal ]



First of all, for "java:comp/env/ejb/FiboBean":

-->"java:comp/env" is always there

-->"ejb/FiboBean" is an id that you made up yourself, that identifies the item


There are two ways you can do the lookup:

#1) specifying the whole thing "java:comp/env/ejb/FiboBean"; where 'ejb/FiboBean' is the unique id within the environment represented by "java:comp/env"

#2)
#2.a. specify the initial context as "java:comp/env/ejb"
#2.b. do the lookup using "FiboBean"

both of these #1 and #2 end up doing exactly same lookup; a look up on "java:comp/env/ejb/FiboBean"
[ August 19, 2005: Message edited by: Jesus Angeles ]
 
Get out of my mind! Look! A tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic