aspose file tools*
The moose likes JDBC and the fly likes Understand IntialContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Understand IntialContext" Watch "Understand IntialContext" New topic
Author

Understand IntialContext

Costa lamona
Ranch Hand

Joined: Sep 24, 2006
Posts: 102
Hi

I don't understand at all how this code works?
it comes from this tutorial
http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html




Thanks


SCJP 5
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: http://aspose.com/file-tools
 
subject: Understand IntialContext
 
Similar Threads
Database and J2ee server help needed!
How to configure hsqldb in struts 1.3.8?
Creating Datasource
Setting up Datasource object
Problem using DataSource with core java app