File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Understand IntialContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Understand IntialContext" Watch "Understand IntialContext" New topic

Understand IntialContext

Costa lamona
Ranch Hand

Joined: Sep 24, 2006
Posts: 102

I don't understand at all how this code works?
it comes from this tutorial


Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
The first part obtains a DataSource instance from the JNDI and gets a connection of it.

The second part doesn't compile, but its intent is to create a DataSource instance yourself, configure it yourself and finally get a connection of it.
I agree. Here's the link:
subject: Understand IntialContext
It's not a secret anymore!