Question:
1> Does this "testpropname" gets attached to a JNDI
tree??
2> From what u say it seems this java:comp/env - is
something very specific to EJB - is that a good design
to keem something so specific in JNDI.
3> I do a new IntialContext() and then access those
props from within the ejb - I do not pass any
specifics of the EJB to the InitalContext object - how
does it know which ejbs env its accessing??
4> To me it seems the correct design would have been
to get those env from the EJBContext and not from
InitialContext.
5> i still do not understand how this is technically
possible - In a JNDI tree the key name has to be
unique - so how is it possible to attach 2
"testpropname" for 2 EJBs in the same tree??

TIA
Anamitra
--- Dmitri Colebatch <[EMAIL PROTECTED]> wrote:
> Hi,
>
> in short:  each EJB has its 'own' java:comp/env
> context.  So, two ejbs will see different things in
> their java:comp/env contexts
> (unless you've set them up to be the same).  Also,
> you wont then (ordinarily) be able to do lookups in
> java:comp/env from outside
> ejb code.
>
> cheesr
> dim
>
>
> ----- Original Message -----
> From: "Anamitra Bhattacharyya"
> <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 03, 2002 12:32 PM
> Subject: java:comp/env dilemma
>
>
> > Hi
> > This is very basic question - but pls help me
> > understand this JNDI/EJB stuff. We add environ
> entries
> > to our ejb and that gets attached to the JNDI tree
> by
> > the name java:comp/env/tespropname. Now if I have
> > another EJB with the same property "testpropname"-
> the
> > container will take care that they are separate -
> > though I access them from either of the EJBs using
> > ctx.lookup("java:com/env/testpropname")!!!
> > The spec says:
> >
> > An environment entry is scoped to the enterprise
> bean
> > whose declaration contains the env-entry element.
> > This means that the environment entry is
> inaccessible
> > from other enterprise beans at runtime, and
> > that other enterprise beans may define env-entry
> > elements with the same env-entry-name without
> > causing a name conflict.
> >
> > Can anyone explain this "scoping" concept - I
> looked
> > through the JNDI apis and didnt find anything
> which
> > the container can use to acheive this ejb based
> > "scoping".
> > TIA
> > Anamitra
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Health - your guide to health and wellness
> > http://health.yahoo.com
> >
> >
>
===========================================================================
> > To unsubscribe, send email to
> [EMAIL PROTECTED] and include in the body
> > of the message "signoff EJB-INTEREST".  For
> general help, send email to
> > [EMAIL PROTECTED] and include in the body of
> the message "help".
> >
>


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to