tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Wulff <>
Subject DataSource and initialContext.lookup("java:comp/env")
Date Sun, 07 Nov 2004 03:05:12 GMT
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...


returns a named object.  Best I can tell is that this is a reference
to a starting point in my directory... or something like that.  Is
anyone willing 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");


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message