() fundamentally
takes care of when called?
Context initialContext = new InitialContext();
Context context = (Context) initialContext.lookup(java:comp/env);
DataSource dataSource = (DataSource) context.lookup(jdbc/wms);
thx
Eric
-
To unsubscribe
It's also helpful, I think, to look at a JNDI directory as a database
that's organized in a directory-like fashion. The database contains
objects, not arbitrary data, however. The context is effectively the
database name, and when you lookup something in the context, you're
effectively looking it
(java:comp/env);
DataSource dataSource = (DataSource) context.lookup(jdbc/wms);
thx
Eric
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
to explain what initialContext.lookup() fundamentally
takes care of when called?
Context initialContext = new InitialContext();
Context context = (Context) initialContext.lookup(java:comp/env);
DataSource dataSource = (DataSource) context.lookup(jdbc/wms);
thx
Eric
On Sat, Nov 06, 2004 at 07:05:12PM -0800, Eric Wulff wrote:
I just returned from working on a tutorial at sun which I was inspired
to go over based on my lack of understanding of the code snippet
below. I'm trying to fully understand what's going on. Docs state
that the code...
what initialContext.lookup() fundamentally
takes care of when called?
Context initialContext = new InitialContext();
Context context = (Context) initialContext.lookup(java:comp/env);
DataSource dataSource = (DataSource) context.lookup(jdbc/wms);
thx
Eric