Rickard �berg wrote:
>
> Hi!
>
> Assaf Arkin wrote:
> > java: selects a particular context, in that context '/comp' and 'comp'
> > are the same, except '/comp' has a composite name {"","comp"} while
> > "comp" is just {"comp"}.
> >
> > BTW //comp should also work, since {"","","comp"} is equivalent.
>
> True, but if the namespace is flatly implemented, i.e. a simple lookup
> in a hashtable on everything after the "java:" prefix, then it will
> fail.
But if you just have a hashtable you're missing all the fun :-)
OK, doing JNDI is not fun. But seriously, there is nothing precluding an
application from doing the following:
Context ctx;
ctx = new InitialContext();
ctx = (Context) ctx.lookup( "java:comp/env" );
followed by
ctx.lookup( "myvar" );
ctx.lookup( "jdbc/mydb" );
As a matter of fact, that is how I populate the JNDI ENC.
arkin
>
> /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".
===========================================================================
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".