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".
>
===========================================================================
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".