Gary Albers@TIMEWEB
04/25/2000 07:02 PM

I am using the following code to lookup a property for an EJBean:

     Context envContext = (Context)(new
InitialContext()).lookup("java:comp/env");
     Object myProp = envContext.lookup("myPropName");

I call this code from the bean itself or it's base class and it works fine.

What I am trying to understand is how does the lookup know what bean's
context to look in?

Why don't I need to specify the bean name?

What if two different EJBeans had the same property name but with a
different value,
how does it know which value to return?

I would really appreciate any insight on how this aspect of JNDI works.

TIA,
Gary
[EMAIL PROTECTED]



Reply via email to