Hey
Assaf Arkin wrote:
> Syed Fareed Ahmad wrote:
> >
> > I have TWO questions:
> >
> > Can any body explain me how to access Environment Variables in the EJB
> > 1.1(has changes from 1.0) and How can we do it in the WebSphere 3.0 Advanced
> > Edition for Windows NT?
>
> InitialContext ctx;
>
> ctx = new InitialContext();
> myVar = ctx.lookup( "java:/comp/env/my-var" );
Actually, according to the spec. that should be "java:comp/env/my-var".
Which is a bit weird IMHO. Why use relative names ("java:comp/env")
instead of an absolute name ("java:/comp/env"). It doesn't really make
sense to have relative ones I think. Also, if the namespace is flat,
then the one that is (IMHO) intuitively right, i.e. "java:/comp/env",
will fail on lookup.
/Rickard
--
Rickard Öberg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.dreambean.com
Question reality
===========================================================================
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".